Skip to content

Commit

Permalink
Merge pull request #325 from numtide/fix/global-excludes
Browse files Browse the repository at this point in the history
fix: configure toml keys for config fields
  • Loading branch information
mergify[bot] authored Jul 1, 2024
2 parents c3e3c05 + a77db52 commit 33d2f60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
type Config struct {
Global struct {
// 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"`
}

Expand Down
10 changes: 5 additions & 5 deletions config/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package config

type Formatter struct {
// 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 []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 []string
Includes []string `toml:"includes,omitempty"`
// 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.
Priority int
Priority int `toml:"priority,omitempty"`
}

0 comments on commit 33d2f60

Please sign in to comment.