Skip to content

Commit

Permalink
rename new 'ignored' field to 'ignore' for consistency with previous …
Browse files Browse the repository at this point in the history
…ignore option
  • Loading branch information
protolambda committed May 23, 2024
1 parent 04698fa commit 058ea2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def:
description: "The `printer` package prints greetings"
globs:
- "hello/printer/*"
- "hello/printer/display/**" # double start glob patterns work too, for recursive matching!
ignore:
- "hello/printer/testdata/**" # to group test-data with the package, but ignore the lines, use "ignore"
- title: "MOTD"
description: "New package that generates a message of the day (MOTD) to add to the greeting"
globs:
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ type ForkDefinition struct {
Description string `yaml:"description,omitempty"`
Globs []string `yaml:"globs,omitempty"`
Sub []*ForkDefinition `yaml:"sub,omitempty"`
Ignored []string `yaml:"ignored,omitempty"`
Ignore []string `yaml:"ignore,omitempty"`

Files []FilePatchStats `yaml:"-"`
LinesAdded int `yaml:"-"`
Expand Down Expand Up @@ -333,7 +333,7 @@ func (fd *ForkDefinition) hydrate(patchByName map[string]diff.FilePatch, remaini
fmt.Printf("cannot find patch %q\n", name)
continue
}
for _, globPattern := range fd.Ignored {
for _, globPattern := range fd.Ignore {
if ok, err := doublestar.Match(globPattern, name); err != nil {
return fmt.Errorf("failed to glob match ignored-entry %q against pattern %q", name, globPattern)
} else if ok {
Expand Down

0 comments on commit 058ea2c

Please sign in to comment.