-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use theforeman-rubocop gem #58
Conversation
|
||
Layout/LineLength: | ||
Enabled: false | ||
|
||
Metrics: | ||
Enabled: false | ||
|
||
Style/FormatStringToken: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as in https://github.com/theforeman/hammer_cli_foreman_bootdisk/pull/18/files. Can we remove all other exceptions and have the config file the same as in the https://github.com/theforeman/hammer-cli-foreman-google/blob/master/.rubocop.yml?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stejskalleos here we already have rubocop todo file so added some cops in there, because right now our focus is more on adding theforeman-rubocop gem and less focus on solving all the offenses because of the new style rules. but i tried to solve some.
Inherited strictest.yml here, this rules have NewCops enable config. Also dropped some cops from here because that was either included in the inherit file or was not needed anymore.
@@ -24,5 +26,5 @@ rescue LoadError | |||
task default: :test | |||
else | |||
RuboCop::RakeTask.new | |||
task default: [:rubocop, :test] | |||
task default: %i[rubocop test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is due to Style/SymbolArray
cop
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. | ||
# SupportedStyles: single_quotes, double_quotes | ||
Style/StringLiterals: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also updated some cops in todo file, which was causing major changes in the code, but what do you think of it?
Thanks @archanaserver |
Inherited strictest.yml here, this rules have NewCops enable config.
Also dropped some cops from here because that was either included
in the inherit file or was not needed anymore.
This is part of Rubocop standerdization, link for the reference:
https://community.theforeman.org/t/standardizing-rubocop-with-theforeman-rubocop/37239
https://github.com/theforeman/theforeman-rubocop/?tab=readme-ov-file#all-opinionated-cops-with-new-ones---strictest