Closed dheerajkumar23 closed 7 months ago
This is standard behavior for most command line utilities, especially on Linux and UNIX systems. See the Rule of Silence.
I could see a benefit to a verbose mode flag that would output something at the end like this
23 files checked
0 warnings
0 errors
What is verbose mode tag for yamllint? Mostly, it is -v
and even when I ran yamllint --help
there is no tag for versbose mode...
The verbose flag doesn't exist for yamllint, I meant to suggest that maybe it should -v
is used for printing the version in yamllint, so it would probably need to be -V
(or --verbose
for the long form). I don't see multiple levels of verbosity being needed like some utilities (e.g. curl) provide.
Thanks @andrewimeson. That's what is the issue all about. And today I found one more issue @adrienverge which is that when we run yamllint
using subprocress in python. If it catches an error it will be stored from subprocess as stdout() not sterr() which is very confusing as it is seemingly throwing an error then why it is not able to catch it. But this issue could be with subprocess library as well. I am not sure which one is responsible :(
If such an option existed, it could be named --summary
. But like @andrewimeson pointed out, this is standard behavior amongst UNIX tools; I support this Rule of Silence and I'm in favor of simplicity.
Depending on the need, alternatives can be yamllint --list-files .
to check that yamllint would actually process files, or yamllint --list-files . | wc -l
to know the number of files checked, for instance.
Closing the issue as I don't think any action can be taken.
yamllint -d "{rules: {anchors: {forbid-undeclared-aliases: true, forbid-duplicated-anchors: true, forbid-unused-anchors: true}}}" values.yaml
In this case, if it doesn't find anything useful it doesn't print back anything. However, a meaningful message could be helpful