Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDidNotPassLintCheck = errors.New("input did not pass the lint check")
)
Functions ¶
func Lint ¶
func Lint(fsys fs.FS, paths []string, handler DiffHandler, options FormatOptions) error
Types ¶
type DiffHandler ¶
type FormatOptions ¶
type FormatOptions struct {
// EncodeOptions specifies the encoder-specific format options.
EncodeOptions formatted.EncodeOptions
// FinalNewline specifies whether to ensure the input has a final newline before
// further formatting is applied.
FinalNewline bool `mapstructure:"final-newline"`
// TrimTrailingWhitespace specifies whether to trim any trailing space
// characters from each line before further formatting is applied.
TrimTrailingWhitespace bool `mapstructure:"trim-lines"`
}
Click to show internal directories.
Click to hide internal directories.