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 --verbose-version (-V) flag #464

Merged
merged 4 commits into from
Jan 9, 2023

Conversation

patrickbrown-dev
Copy link
Contributor

This addresses the second feature mentioned in #452. For context, when debugging a RuboCop issue a user is asked to supply the output of rubocop -V, and this streamlines this process for standard users.

This addresses the second feature mentioned in standardrb#452. For context,
when debugging a RuboCop issue a user is asked to supply the
output of `rubocop -V`, and this streamlines this process for
standard users.
def call(command)
require_relative "runners/#{command}"
::Standard::Runners.const_get(command.to_s.capitalize).new
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This meta-programming doesn't work with multiple-word command/constants (for example :verbose_version/VerboseVersion). Instead of modifying to account for this edge-case, I swapped out the code for a HashTable lookup. Less fun, I know. 😢

@searls
Copy link
Contributor

searls commented Sep 29, 2022

Seems fine to me

@searls
Copy link
Contributor

searls commented Sep 29, 2022

@camilopayan merge if LGTU?

@patrickbrown-dev
Copy link
Contributor Author

@camilopayan just updated branch from main if you want to take a look!

@saturnflyer
Copy link

@patrickbrown-dev should the .idea directory be included in this PR?

@patrickbrown-dev
Copy link
Contributor Author

@saturnflyer nope, that's on me!

@patrickbrown-dev
Copy link
Contributor Author

@saturnflyer .idea/ dir removed. Nice catch!

@searls
Copy link
Contributor

searls commented Jan 9, 2023

LGTM! Love when I see a PR and don't feel like I need to pull it down to test it locally before merge

@searls searls merged commit 1808355 into standardrb:main Jan 9, 2023
@patrickbrown-dev patrickbrown-dev deleted the feat_verbose-version branch January 9, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants