mirror of
https://github.com/numtide/treefmt.git
synced 2024-10-03 20:18:11 +03:00
fix: configure toml tags for config fields
Signed-off-by: Brian McGee <brian@bmcgee.ie>
This commit is contained in:
parent
ab9f831d72
commit
2e05603d1e
@ -10,8 +10,8 @@ import (
|
|||||||
type Config struct {
|
type Config struct {
|
||||||
Global struct {
|
Global struct {
|
||||||
// Excludes is an optional list of glob patterns used to exclude certain files from all formatters.
|
// Excludes is an optional list of glob patterns used to exclude certain files from all formatters.
|
||||||
Excludes []string
|
Excludes []string `toml:"excludes"`
|
||||||
}
|
} `toml:"global"`
|
||||||
Formatters map[string]*Formatter `toml:"formatter"`
|
Formatters map[string]*Formatter `toml:"formatter"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,13 +2,13 @@ package config
|
|||||||
|
|
||||||
type Formatter struct {
|
type Formatter struct {
|
||||||
// Command is the command to invoke when applying this Formatter.
|
// Command is the command to invoke when applying this Formatter.
|
||||||
Command string
|
Command string `toml:"command"`
|
||||||
// Options are an optional list of args to be passed to Command.
|
// Options are an optional list of args to be passed to Command.
|
||||||
Options []string
|
Options []string `toml:"options,omitempty"`
|
||||||
// Includes is a list of glob patterns used to determine whether this Formatter should be applied against a path.
|
// Includes is a list of glob patterns used to determine whether this Formatter should be applied against a path.
|
||||||
Includes []string
|
Includes []string `toml:"includes,omitempty"`
|
||||||
// Excludes is an optional list of glob patterns used to exclude certain files from this Formatter.
|
// Excludes is an optional list of glob patterns used to exclude certain files from this Formatter.
|
||||||
Excludes []string
|
Excludes []string `toml:"excludes,omitempty"`
|
||||||
// Indicates the order of precedence when executing this Formatter in a sequence of Formatters.
|
// Indicates the order of precedence when executing this Formatter in a sequence of Formatters.
|
||||||
Priority int
|
Priority int `toml:"priority,omitempty"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user