Documentation ¶
Index ¶
Constants ¶
View Source
const (
BatchSize = 1024
)
Variables ¶
View Source
var Cli = Format{}
View Source
var (
ErrFailOnChange = errors.New("unexpected changes detected, --fail-on-change is enabled")
)
Functions ¶
func ConfigureLogging ¶
func ConfigureLogging()
Types ¶
type Format ¶
type Format struct { AllowMissingFormatter bool `default:"false" help:"Do not exit with error if a configured formatter is missing"` WorkingDirectory kong.ChangeDirFlag `` /* 134-byte string literal not displayed */ NoCache bool `help:"Ignore the evaluation cache entirely. Useful for CI"` ClearCache bool `short:"c" help:"Reset the evaluation cache. Use in case the cache is not precise enough"` ConfigFile string `type:"existingfile" default:"./treefmt.toml"` FailOnChange bool `help:"Exit with error if any changes were made. Useful for CI."` Formatters []string `help:"Specify formatters to apply. Defaults to all formatters."` TreeRoot string `type:"existingdir" default:"."` Walk walk.Type `` /* 156-byte string literal not displayed */ Verbosity int `name:"verbose" short:"v" type:"counter" default:"0" env:"LOG_LEVEL" help:"Set the verbosity of logs e.g. -vv."` Version bool `name:"version" short:"V" help:"Print version"` Init bool `name:"init" short:"i" help:"Create a new treefmt.toml"` Paths []string `name:"paths" arg:"" type:"path" optional:"" help:"Paths to format. Defaults to formatting the whole tree."` Stdin bool `help:"Format the context passed in via stdin"` }
Click to show internal directories.
Click to hide internal directories.