warpnet / salt-lint

A command-line utility that checks for best practices in SaltStack.
https://salt-lint.readthedocs.io/en/latest/
MIT License
152 stars 39 forks source link

"global" config file option `~/.salt-lint` or `~/.config/.salt-lint` or XDG_whatever? #310

Closed mdschmitt closed 8 months ago

mdschmitt commented 1 year ago

Is your feature request related to a problem? Please describe. I'd really like to have a "main" salt-lint config file for ignoring, say, rule 204 but it looks to me like it's hard-set to the current directory. Can you make it so that it defaults to ~/.config/.salt-lint or something similar if the local one isn't found?

Describe the solution you'd like If there's no

$(pwd)/.salt-lint

then look for

$XDG_CONFIG/.salt-lint

or ~/.salt-lint and source that if it exists.

Describe alternatives you've considered n/a

Additional context https://github.com/warpnet/salt-lint/blob/main/saltlint/config.py#L21 looks to be the place?

roaldnefs commented 8 months ago

Thanks @mdschmitt for your feature request. Unfortunately we won't be introducing global configuration options. You can specify you own configuration file using the -c argument.