Run every applicable rule against `src_text` for `path`. The driver in code-verify.py wraps each Finding as a Violation.
(path: Path, src_text: str, fence_mask: list[bool])
| 3169 | |
| 3170 | |
| 3171 | def analyze(path: Path, src_text: str, fence_mask: list[bool]) -> list[Finding]: |
| 3172 | """Run every applicable rule against `src_text` for `path`. The driver |
| 3173 | in code-verify.py wraps each Finding as a Violation.""" |
| 3174 | suffix = path.suffix.lower() |
| 3175 | out: list[Finding] = [] |
| 3176 | |
| 3177 | def fenced(line: int) -> bool: |
| 3178 | idx = line - 1 |
| 3179 | return 0 <= idx < len(fence_mask) and fence_mask[idx] |
| 3180 | |
| 3181 | if suffix in (".cpp", ".cc", ".cxx", ".c", ".h", ".hpp", ".hxx", ".mm"): |
| 3182 | out.extend(_cpp_rules(src_text.encode("utf-8"), path, fence_mask)) |
| 3183 | out.extend(_comment_narration_findings(src_text, path, fence_mask)) |
| 3184 | out.extend(_trailing_doxy_findings(src_text, path, fence_mask)) |
| 3185 | out.extend(_stdio_findings(src_text, path, fence_mask)) |
| 3186 | out.extend(_api_scope_naming_findings(src_text, path, fenced)) |
| 3187 | return out |
| 3188 | if suffix == ".qml": |
| 3189 | out.extend(_qml_rules(src_text, path, fence_mask)) |
| 3190 | out.extend(_comment_narration_findings(src_text, path, fence_mask)) |
| 3191 | return out |
| 3192 | return out |
nothing calls this directly
no test coverage detected