Modules§
Structs§
- File
Changes - Represents the added and removed line numbers for a file in a diff.
- Line
Range - Inclusive range of line numbers in a target file’s labeled section.
- Lint
Result - Result of linting: collected errors and output messages.
Enums§
- Directive
- The kinds of lint directives supported in source files.
- Directive
Parse Error
Functions§
- find_
repo_ root - Walk up from
startlooking for a known SCM marker (directory or file). Returns the repo root directory, orNoneif not found. - lint_
diff - parse_
changed_ lines - Parse a unified diff text and return a map from file path to the set of added and removed line numbers.
- parse_
directives_ from_ content - Parse LINT directives from content string (used by both file parsing and check mode).
- parse_
file_ directives - Parse all LINT directives from a file.
- validate_
directive_ uniqueness - Check for duplicate labels across IfChange labels and Label names within a file.