sbdchd / squawk

🐘 linter for PostgreSQL, focused on migrations
https://squawkhq.com
GNU General Public License v3.0
594 stars 40 forks source link

Squawk ignores excludes in the config file when excludes are passed on the cli #344

Open Riscky opened 6 months ago

Riscky commented 6 months ago

When using the --exclude command line flag, Squawk ignores excludes that were loaded from the config file. To me this is unexpected (other linters that I've used combine those), and makes the config file less useful (to me). Is there a use case for ignoring the excludes from the config file, or can we just combine the excludes?

This issue has been mentioned before in https://github.com/sbdchd/squawk/pull/213:

One case that I have not covered here is if the user wants to use both the CLI flags and the config file, one solution for this case would be to use the -c/--config flag together with the --exclude flag to signal the program that the user wants to merge those two together, but it's not a change that I want to do in this PR and it would be beneficial to reach an agreement with the contributors/community before deciding on a way to handle this case.