Skip to content
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 CLI option #2382

Closed
ybiquitous opened this issue Mar 2, 2020 · 1 comment · Fixed by #2383
Closed

Add --version CLI option #2382

ybiquitous opened this issue Mar 2, 2020 · 1 comment · Fixed by #2383

Comments

@ybiquitous
Copy link

Hello, I think more useful for many people if detekt would have a --version option to show the version to console.

Expected Behavior

$ detekt --version
1.6.0

Current Behavior

$ detekt --version
Was passed main parameter '--version' but no main parameter was defined in your arg class

Usage: detekt [options]
  Options:
    --auto-correct, -ac
...

Context

For example, ktlint gets its version from its manifest file,

https://github.com/pinterest/ktlint/blob/9eb31ca6fbe1fd3f0fca708fafc15468218cecc5/ktlint/src/main/kotlin/com/pinterest/ktlint/internal/KtlintVersionProvider.kt#L16-L18

so I believe that detekt can show the version in a similar way.

What do you think about this suggestion?
Thank you for reading.

@ybiquitous
Copy link
Author

Thank you for addressing this! I'm looking forward to the next release. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants