-
-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --version to cli #2383
Add --version to cli #2383
Conversation
You were just a few seconds faster than me in regards to the PR for this topic. 😉 |
detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/VersionPrinter.kt
Outdated
Show resolved
Hide resolved
I think it is because of these lines: |
Yes! adding a manifest in the test resources did the trick. I edited the code too. I we can't know the version of detekt we should fail the task. We don't want to exit with a success because that can mess up the scripts of the users. I can't test the failure case but it should never happen. |
Codecov Report
@@ Coverage Diff @@
## master #2383 +/- ##
============================================
+ Coverage 82.73% 82.81% +0.08%
- Complexity 2135 2141 +6
============================================
Files 352 353 +1
Lines 6080 6087 +7
Branches 1109 1111 +2
============================================
+ Hits 5030 5041 +11
+ Misses 480 476 -4
Partials 570 570
Continue to review full report at Codecov.
|
Closes #2382
This PR adds the --version flag. It prints the version of the running detekt cli.
I have a problem testing this. And It's that
whichVersion()
retutnsnull
in test mode. Any idea?