Skip to main content

Module fix

Module fix 

Source
Expand description

API for transforming file content, for example to apply formatting, and propagate those changes across revisions.

Structs§

FileToFix
Represents a file whose content may be transformed by a FileFixer.
FixSummary
Aggregate information about the outcome of the file fixer.
FormatRange
A formattable range of lines or bytes.
ParallelFileFixer
A FileFixer that applies fix_fn to each file, in parallel.

Enums§

FixError
Error fixing files.
RegionsToFormat
Representation of different ranges formatters can use to emit diff ranges.

Traits§

FileFixer
Fixes a set of files.

Functions§

compute_changed_ranges
Computes the 1-based line ranges in current that are different from base. The ranges produced can be empty.
compute_file_line_count
Computes the number of lines in a byte slice (i.e. a file).
fix_files
Updates files with formatting fixes or other changes, using the given FileFixer.
get_base_commit_map
Given a vector of commits, determine the base commit(s) for each of the commits in the vector.

Type Aliases§

LineRange
A line range (1-based, inclusive [first, last]).