golangci-lint
golangci-lint copied to clipboard
Add options to include/exclude paths
Your feature request related to a problem? Please describe
I use https://entgo.io. It generates an /ent directory, and expects you to put your schema definitions in /ent/schema. It then generates code in /ent/foo, /ent/bar, etc. I have no control over the generated code, so I don't want to see linter errors for it. I don't see a way to exclude /ent/**, but include /ent/schema.
Describe the solution you'd like
run --exclude-path '^ent/.*$' --include-path '^ent/schema/.*$'
Describe alternatives you've considered
--exclude-dirs only works on directory names, which won't work if you want to skip some directories and exclude others with the same name.
Additional context
No response