Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fixer ¶
type Fixer struct {
Config *config.Config
Rules []rule.Rule
StripFrontMatter bool
Logger *vlog.Logger
// RootDir is the project root directory (parent of .mdsmith.yml).
// Used by rules that need to read files relative to the project root.
RootDir string
// MaxInputBytes is the maximum file size in bytes before a file is
// skipped with an error. Zero or negative means unlimited.
MaxInputBytes int64
// Explain, when true, attaches per-leaf rule provenance to each
// remaining diagnostic so output formatters can render an
// explanation trailer.
Explain bool
// contains filtered or unexported fields
}
Fixer applies auto-fixes for fixable rules and reports remaining diagnostics.
type Result ¶
type Result struct {
// FilesChecked is the number of files processed (after ignore filtering).
FilesChecked int
// Failures is the number of diagnostics found before attempting fixes.
Failures int
// Diagnostics contains remaining diagnostics after fixing (from non-fixable
// rules and any violations that could not be auto-fixed).
Diagnostics []lint.Diagnostic
// Modified lists file paths that were written back to disk.
Modified []string
// Errors contains any errors encountered during the fix process.
Errors []error
}
Result holds the outcome of a fix run.
Click to show internal directories.
Click to hide internal directories.