Run the checker on *code* and return violations for *path*.
(
code: str,
path: str = _FL_PATH,
fastled_h: str = "",
)
| 53 | |
| 54 | |
| 55 | def _violations( |
| 56 | code: str, |
| 57 | path: str = _FL_PATH, |
| 58 | fastled_h: str = "", |
| 59 | ) -> list[tuple[int, str]]: |
| 60 | """Run the checker on *code* and return violations for *path*.""" |
| 61 | checker, fc = _make(code, path, fastled_h) |
| 62 | if not checker.should_process_file(path): |
| 63 | return [] |
| 64 | checker.check_file_content(fc) |
| 65 | return checker.violations.get(path, []) |
| 66 | |
| 67 | |
| 68 | # --------------------------------------------------------------------------- |
no test coverage detected