You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like exclude does not support globbing, the docs don't explicitly mention that it does (or doesn't), so maybe this is by-design? But I would expect to be able to declare globbed exclusions (generated files, whole directories, etc)
You can see a small example here by utilizing a loop over sources:
Hey @polds. Thanks for the excellent repro steps. Took me a second to figure out what was wrong, but it's as simple as unquoting "exclude: ...". exclude should be an actual YAML key rather than a part of the glob string.
Working example below:
version: '3'tasks:
default:
sources:
- "**/*.go"
- exclude: "**/*_gen.go"# Try to exclude all files ending with _gen.go
- exclude: "3/**/*.go"# Try to exclude an entire directorycmds:
- for: sourcescmd: echo {{.ITEM}}
It looks like exclude does not support globbing, the docs don't explicitly mention that it does (or doesn't), so maybe this is by-design? But I would expect to be able to declare globbed exclusions (generated files, whole directories, etc)
You can see a small example here by utilizing a loop over sources:
Taskfile.yaml
Result
What I would expect based on the excludes:
task: [default] echo 1/b_gen.go
is not executed due toexclude: **/*_gen.go
task: [default] echo 3/d.go
is not executed due toexclude: 3/**/*.go
If I add
exclude: 3/d.go
it does correctly exclude it from the output.The text was updated successfully, but these errors were encountered: