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

Default running against cdw #324

Open gonzoinc opened 3 months ago

gonzoinc commented 3 months ago

Please update the salt-lint command to default run against the current working directory. It is very odd to need to build out the find statement to run the linter against all files in a salt repo, that should be default action if no args are present.

NoRePercussions commented 2 months ago

I'm not sure if it is very odd -- a quick survey of whether linters and checkers I think of assume this by default:

alejandra: no ansible-lint: yes black: no flake8: yes ruff: yes shellcheck: no

I agree that this would be nice, though because salt-lint defaults to looking for init.sls when called on a directory, I don't think it would be as pretty as just defaulting to ..

Globbing is perhaps a briefer way to search in most modern shells (including bash with the globstar option): salt-lint **/*.sls