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

Use theforeman-rubocop gem #157

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

archanaserver
Copy link
Contributor

Choose to inherit just some cops, because i wanted to inherit rules from style_lenient.yml as well, i followed this
https://github.com/theforeman/theforeman-rubocop?tab=readme-ov-file#choose-just-some-cops

Also drop some cops from the .rubocop.yml config, because that was present in inherit-gem and upgraded theforeman-rubocop gem version from 0.0.6 -> 0.1.0

This is part of Rubocop standerdization, link for the reference:
https://community.theforeman.org/t/standardizing-rubocop-with-theforeman-rubocop/37239

.rubocop.yml Outdated Show resolved Hide resolved
.rubocop.yml Outdated Show resolved Hide resolved
.rubocop.yml Outdated Show resolved Hide resolved
@archanaserver
Copy link
Contributor Author

@ekohl could you spare a moment to review the latest changes?

@@ -15,7 +15,7 @@ Gem::Specification.new do |s|

s.required_ruby_version = '>= 2.5', '< 4.0'

s.add_development_dependency('theforeman-rubocop', '~> 0.0.6')
s.add_development_dependency('theforeman-rubocop', '~> 0.1.0')
Copy link
Contributor

Choose a reason for hiding this comment

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

In other plugins (Rex, Leapp, Ansible, Google), I don't see the foreman-robocop as a development dependency. Do we have to configure it, and does it have to be so version strict?

Copy link
Member

Choose a reason for hiding this comment

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

theforeman/foreman_ansible#705 it does when this is merged ;)

And yes, we need rather strict versions due to changes in the underlying rubocop versions -- otherwise you get too much red

Choose to inherit just some cops, because i wanted to inherit rules from
style_lenient.yml as well, i followed this
https://github.com/theforeman/theforeman-rubocop?tab=readme-ov-file#choose-just-some-cops

Also drop some cops from the .rubocop.yml config, because that was present in inherit-gem.
@evgeni evgeni merged commit 1a3d8f3 into theforeman:master Jul 22, 2024
23 checks passed
@archanaserver archanaserver deleted the rubocop branch July 23, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants