(
self, content: str, path: str = "src/fl/test.cpp"
)
| 36 | """Verify the single-regex optimization still catches all banned headers.""" |
| 37 | |
| 38 | def _check( |
| 39 | self, content: str, path: str = "src/fl/test.cpp" |
| 40 | ) -> list[tuple[int, str]]: |
| 41 | checker = BannedHeadersChecker( |
| 42 | banned_headers_list=BANNED_HEADERS_CORE, strict_mode=True |
| 43 | ) |
| 44 | checker.check_file_content(_make(content, path)) |
| 45 | return checker.violations.get(path, []) |
| 46 | |
| 47 | def test_detects_banned_vector(self): |
| 48 | violations = self._check("#include <vector>\nint x;") |
no test coverage detected