Pre-commit hooks ignores -s argument
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.2.0
hooks:
- id: helm-docs
args:
- -s file
Given the above I was expecting helm-docs to keep the order in the table as the file itself, instead it still processes it as this argument hasn't been passed and sets all up alphanumerically
Another test I tried was the following
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.2.0
hooks:
- id: helm-docs
args:
- -s filefafsfd
this again gets completely ignored
I think this is related to how pre-commit / YAML in general handles command line arguments. Have you tried the following?
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.2.0
hooks:
- id: helm-docs
args:
- -s
- filefafsfd
Putting the argument on a separate line might do the trick. Alternatively, you can use the long-arg format with an = sign like so:
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.2.0
hooks:
- id: helm-docs
args:
- --sort-values-order=filefafsfd
@emanuele-leopardi Did you try what @sc250024 proposes? If so how did it do?
@sc250024 Do you think this should be a thing that makes sense to manage on our end?
Yep I confirm it works that way! Thanks