Could we possibly get an option to hide bandit out...
# general
c
Could we possibly get an option to hide bandit output on success? It will always print to stdout regardless of the process's exit code.
👍 1
c
Would you like to create an issue for it on GitHub? https://github.com/pantsbuild/pants/issues That way it’ll be easier to track and plan etc. 🙂
❤️ 1
1
h
That's a good idea! Not very difficult to implement either If you'd be interested in contributing, I'd be happy to add instructions to that issue. I think it'd take no more than 20 lines or so (including a test). Either way, I agree with Andreas on creating an issue. -- Also it would be good to double check if Bandit already has a quiet option
h
There is prior art with the
--output
flag in the
test
goal
Is this something we'd want to do globally for all linters, or on a per-linter basis?
h
I think per-linter. Linter output is very helpful with Black for example. Super noisy with Bandit
c
Bandit does have a quiet option
--quiet
which fixes this problem
h
Ah, great! Does --quiet silence error cases too much tho?
FYI you can set this in pants.toml [bandit] args = ["--quiet"]
c
It does the correct thing with
--quiet
there is an option for
--silent
that will hide the errors.
Might be nice to put in the docs somewhere but doesn't seem to be a bandit page out side of the options.
h
Okay, great! Perhaps a "tip" toolbox on https://www.pantsbuild.org/v2.7/docs/python-linters-and-formatters? Or perhaps we've graduated to the point that we should have a section on that page like "Tool specific notes", and a subsection on Bandit. Wdyt?