Only show violated rules when target version is given
See original GitHub issueWhen the --target argument is given, we expect vermin to work more like a linter: it has a predefined goal, matches some rules and report violations (and set exit code to 0 or 1 accordingly). Typically linters emit as few output lines as possible when there is no violation found, and only display violated rules when found. This helps users spot rule violations more easily, compare this:
$ python3 vermin.py -t=2.7 -t=3.0 --format parsable .
/path/to/vermin/misc/travis/after_success.sh:4:7: error: invalid syntax: if [[ $TRAVIS_PYTHON_VERSION != 2.7 && $TRAVIS_PYTHON_VERSION != 3.4 ]]; then
/path/to/vermin/misc/travis/script.sh:4:7: error: invalid syntax: if [[ $TRAVIS_PYTHON_VERSION = 2.7 || $TRAVIS_PYTHON_VERSION = 3.4 ]]; then
(many lines omitted ...)
/path/to/vermin/runtests.py:8::2.7:3.1:'unittest.main(exit)'
/path/to/vermin/runtests.py:::2.7:3.1:
(many lines omitted ...)
:::2.7:3.1:
with this:
$ python3 vermin.py -t=2.7 -t=3.0 --format parsable .
/path/to/vermin/runtests.py:8::2.7:3.1:'unittest.main(exit)'
/path/to/vermin/runtests.py:::2.7:3.1:
:::2.7:3.1:
We can either:
- Add a flag like
--only-show-violated(maybe a shorter name) to do this, this flag only makes sense when--targetis given - Make this behavior to be the default when
--targetis given (this is backwards incompatible behavior change)
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Target Corporation Code of Ethics
Watch for potential violations of our. Code, our policies or any laws and voice your concerns immediately. Live Target values. Make sure every...
Read more >Troubleshooting Amazon EventBridge - AWS Documentation
How can I tell when EventBridge rules are broken? You can use the following alarm to notify you when your EventBridge rules are...
Read more >Behavior changes: Apps targeting Android 12
Learn about changes in Android 12 that will affect apps when they target Android 12.
Read more >Suppress code analysis violations - Visual Studio (Windows)
The Error List displays diagnostics, or rule violations, from both live code analysis and build.
Read more >My Android app is not working properly once I set targetSDK ...
Use this flexibility as you prepare to target the latest stable API version and as you test your app with the preview release...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve tested this against some of my projects and I think the current implementation is pretty good.
-Xis probably a bit weird since it usually means “eXtension” or “eXtra” or “eXecute”.