|
PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Data Structures | |
| class | AuditFinding |
| Represents one audit failure. More... | |
Functions | |
| list[Path] | _iter_c_files (tuple[Path,...] directories) |
| Returns all C or header files below the configured directories. | |
| list[Path] | _iter_python_files () |
| Returns all Python source files covered by the audit. | |
| list[str] | _read_lines (Path path) |
| Reads a text file into a list of lines. | |
| str | _relative_path (Path path) |
| Returns a repository-relative path string. | |
| tuple[int, int]|None | _find_attached_doxygen_block (list[str] lines, int start_line) |
| Finds the Doxygen block immediately attached to a declaration or definition. | |
| list[str] | _split_c_parameters (str signature) |
| Splits a C signature parameter list into parameter names. | |
| str | _c_return_type (str signature, str symbol) |
| Extracts the declared C return type prefix for one signature. | |
| bool | _return_tag_required (str return_type) |
Reports whether a Doxygen @return tag is required for a C symbol. | |
| list[tuple[int, str, str]] | _collect_c_signatures (Path path, str require_terminator) |
| Collects C signatures from a header or source file. | |
| list[AuditFinding] | _audit_c_header (Path path) |
| Audits public C declarations in one header file. | |
| list[AuditFinding] | _audit_c_source (Path path) |
| Audits function definitions in one C source file. | |
| list[str] | _python_parameter_names (ast.FunctionDef|ast.AsyncFunctionDef node) |
| Returns the meaningful Python parameter names for one function node. | |
| bool | _python_requires_return (ast.FunctionDef|ast.AsyncFunctionDef node) |
| Reports whether one Python function should document a return value. | |
| list[AuditFinding] | _audit_python_file (Path path) |
| Audits Python function docstrings in one file. | |
| list[AuditFinding] | _collect_findings () |
| Runs the full repository documentation audit. | |
| None | _print_findings (list[AuditFinding] findings) |
| Prints findings in a grep-friendly format. | |
| int | main () |
| Runs the repository function documentation audit from the command line. | |
Variables | |
| REPO_ROOT = Path(__file__).resolve().parents[1] | |
| tuple | C_HEADER_DIRS = (REPO_ROOT / "include",) |
| tuple | C_SOURCE_DIRS = (REPO_ROOT / "src", REPO_ROOT / "tests" / "c") |
| tuple | PYTHON_DIRS = (REPO_ROOT / "scripts", REPO_ROOT / "tests") |
| tuple | PYTHON_EXTRA_FILES |
| C_DECL_START_RE | |
| C_PARAM_RE = re.compile(r"@param(?:\[[^\]]+\])?\s+([A-Za-z_][A-Za-z0-9_]*)") | |
|
protected |
Returns all C or header files below the configured directories.
| [in] | directories | Root directories to scan. |
Definition at line 60 of file audit_function_docs.py.
|
protected |
Returns all Python source files covered by the audit.
Definition at line 75 of file audit_function_docs.py.
|
protected |
Reads a text file into a list of lines.
| [in] | path | Path to read. |
Definition at line 94 of file audit_function_docs.py.
|
protected |
Returns a repository-relative path string.
| [in] | path | Absolute or repository-local path. |
Definition at line 104 of file audit_function_docs.py.
|
protected |
Finds the Doxygen block immediately attached to a declaration or definition.
| [in] | lines | File content lines. |
| [in] | start_line | 0-based line index where the symbol begins. |
(start, end) line indices for the attached block, or None. Definition at line 114 of file audit_function_docs.py.
|
protected |
Splits a C signature parameter list into parameter names.
| [in] | signature | Full function signature text. |
void and variadics. Definition at line 139 of file audit_function_docs.py.
|
protected |
Extracts the declared C return type prefix for one signature.
| [in] | signature | Full function signature text. |
| [in] | symbol | Function name contained in the signature. |
Definition at line 182 of file audit_function_docs.py.
|
protected |
Reports whether a Doxygen @return tag is required for a C symbol.
| [in] | return_type | Normalized return-type prefix. |
True when the symbol does not return void. Definition at line 194 of file audit_function_docs.py.
|
protected |
Collects C signatures from a header or source file.
| [in] | path | File to scan. |
| [in] | require_terminator | Expected signature terminator, either ; or {. |
(start_line, symbol, signature_text) tuples. Definition at line 205 of file audit_function_docs.py.
|
protected |
Audits public C declarations in one header file.
| [in] | path | Header file to scan. |
Definition at line 258 of file audit_function_docs.py.
|
protected |
Audits function definitions in one C source file.
| [in] | path | Source file to scan. |
Definition at line 295 of file audit_function_docs.py.
|
protected |
Returns the meaningful Python parameter names for one function node.
| [in] | node | Function AST node. |
@param tags. Definition at line 317 of file audit_function_docs.py.
|
protected |
Reports whether one Python function should document a return value.
| [in] | node | Function AST node. |
True when the function returns a non-None value. Definition at line 333 of file audit_function_docs.py.
|
protected |
Audits Python function docstrings in one file.
| [in] | path | Python source file to scan. |
Definition at line 348 of file audit_function_docs.py.
|
protected |
Runs the full repository documentation audit.
Definition at line 389 of file audit_function_docs.py.
|
protected |
Prints findings in a grep-friendly format.
| [in] | findings | Findings to render. |
Definition at line 407 of file audit_function_docs.py.
| int audit_function_docs.main | ( | ) |
Runs the repository function documentation audit from the command line.
Definition at line 417 of file audit_function_docs.py.
| audit_function_docs.REPO_ROOT = Path(__file__).resolve().parents[1] |
Definition at line 25 of file audit_function_docs.py.
| tuple audit_function_docs.C_HEADER_DIRS = (REPO_ROOT / "include",) |
Definition at line 27 of file audit_function_docs.py.
Definition at line 28 of file audit_function_docs.py.
Definition at line 29 of file audit_function_docs.py.
| tuple audit_function_docs.PYTHON_EXTRA_FILES |
Definition at line 30 of file audit_function_docs.py.
| audit_function_docs.C_DECL_START_RE |
Definition at line 35 of file audit_function_docs.py.
| audit_function_docs.C_PARAM_RE = re.compile(r"@param(?:\[[^\]]+\])?\s+([A-Za-z_][A-Za-z0-9_]*)") |
Definition at line 41 of file audit_function_docs.py.