Skip to main content

Crate ifchange

Crate ifchange 

Source

Modules§

cli

Structs§

FileChanges
Represents the added and removed line numbers for a file in a diff.
LineRange
Inclusive range of line numbers in a target file’s labeled section.
LintResult
Result of linting: collected errors and output messages.

Enums§

Directive
The kinds of lint directives supported in source files.
DirectiveParseError

Functions§

find_repo_root
Walk up from start looking for a known SCM marker (directory or file). Returns the repo root directory, or None if 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.