Prepare SPHLite 0.2.0 development baseline

This commit is contained in:
Codex
2026-07-02 19:50:44 +08:00
parent ad31c2d5cc
commit ed1f5a5ab2
36 changed files with 3122 additions and 267 deletions
+5 -2
View File
@@ -7,6 +7,7 @@ from pathlib import Path
FORTRAN_FILE_MAX_LINES = 700
C_FILE_MAX_LINES = 500
PYTHON_FILE_MAX_LINES = 500
FORTRAN_PROCEDURE_MAX_LINES = 140
@@ -34,7 +35,7 @@ def source_files(root: Path) -> list[Path]:
continue
if rel_path.parts and rel_path.parts[0].startswith("build"):
continue
if path.suffix.lower() in {".f90", ".c", ".h", ".hpp"}:
if path.suffix.lower() in {".f90", ".c", ".cpp", ".h", ".hpp", ".py"}:
result.append(path)
return sorted(result)
@@ -49,8 +50,10 @@ def check_file_lines(root: Path, path: Path, exceptions: set[str], errors: list[
suffix = path.suffix.lower()
if suffix in {".f90"}:
limit = FORTRAN_FILE_MAX_LINES
elif suffix in {".c", ".h", ".hpp"}:
elif suffix in {".c", ".cpp", ".h", ".hpp"}:
limit = C_FILE_MAX_LINES
elif suffix == ".py":
limit = PYTHON_FILE_MAX_LINES
else:
return
if len(lines) > limit and rel not in exceptions: