feat: introduce --read-paths to threat PATH as a file containing manifest paths#241
feat: introduce --read-paths to threat PATH as a file containing manifest paths#241Tyrael wants to merge 4 commits into
Conversation
|
Hi, stupid question:
Why? puppet-lint accepts directories, globbing and multiple file paths already. Besides that my recommendation is to always lint all files. Otherwise you won't find issues that are marked by new linting rules, e.g. #175 |
we have a monorepo with a huge amount of modules and files, linting all of the repo for each MR would be a huge waste of resources and would slow down the lint pipeline a ton. I've seen the support for passing a directory and globbing, but I couldn't find a way to pass an arbitrary list of files to puppet-lint, let me know if I missed something.
ofc. when changing puppet-lint version or .puppet-lint.rc we should and do rerun the linter on all files. |
|
@bastelfreak could you please approve the workflow execution? |
you can pass them on the cli like |
Summary
Introducing --read-paths as a new boolean config option, defaulting to false.
When set to true, we would consider PATH as a file containing puppet manifests to lint, separated by newlines.
This is my first contribution here, so I dont't expect this to be accepted as-is, just let me know what should I improve/change to get this right.
Additional Context
We are using puppet-lint as part of our cicd pipelines, and we currently have to resort to xargsing each modified puppet manifest in and executing puppet-lint for each file.
With this change we would be able to specify a list of files to lint in a single puppet-lint execution
Checklist