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 RuboCop for code style enforcement #57

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

nofaralfasi
Copy link
Contributor

No description provided.

@stejskalleos
Copy link
Contributor

TIL that we have hammer jenkins job as well, for some reason it's failing:

1.9.3/lib/ci/reporter/rake/minitest_loader.rb:9:in `<top (required)>': undefined method `runner=' for Minitest::Unit:Class (NoMethodError)
15:54:45 	from /usr/local/rvm/gems/ruby-2.7.4@test_hammer_cli_foreman_discovery_pull_request-0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:21:in `require'
15:54:45 	from /usr/local/rvm/gems/ruby-2.7.4@test_hammer_cli_foreman_discovery_pull_request-0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:21:in `block in <main>'
15:54:45 	from /usr/local/rvm/gems/ruby-2.7.4@test_hammer_cli_foreman_discovery_pull_request-0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:6:in `select'
15:54:45 	from /usr/local/rvm/gems/ruby-2.7.4@test_hammer_cli_foreman_discovery_pull_request-0/gems/rake-13.1.0/lib/rake/rake_test_loader.rb:6:in `<main>'

@ekohl is this something we can fix in this repo or it's a problem in the job itself?

@ekohl
Copy link
Member

ekohl commented Mar 5, 2024

I suspect the version is too old to be compatible:

gem 'ci_reporter', '>= 1.6.3', "< 2.0.0", :require => false

https://rubygems.org/gems/ci_reporter says the latest is 2.1.0

Having said that, we can ask ourselves if we still want ci_reporter. It's only used for reporting in a way that's usable in Jenkins while we're moving away from Jenkins for our CI. So I'd suggest to drop it and drop the Jenkins job in https://github.com/theforeman/jenkins-jobs.

@nofaralfasi nofaralfasi force-pushed the rubocop branch 2 times, most recently from 99ea7ff to 6b97279 Compare March 5, 2024 15:33
Style/IfUnlessModifier:
Enabled: false

Gemspec/RequireMFA:
Copy link
Member

Choose a reason for hiding this comment

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

Another way to deal with this is to add it, but set the value to false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That failed the tests...

@nofaralfasi
Copy link
Contributor Author

Having said that, we can ask ourselves if we still want ci_reporter. It's only used for reporting in a way that's usable in Jenkins while we're moving away from Jenkins for our CI. So I'd suggest to drop it and drop the Jenkins job in https://github.com/theforeman/jenkins-jobs.

Opened theforeman/jenkins-jobs#428 for dropping jenkins jobs.

@stejskalleos stejskalleos merged commit 75a6caf into theforeman:master Mar 14, 2024
9 of 10 checks passed
@stejskalleos
Copy link
Contributor

Thanks @nofaralfasi @ekohl

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.

3 participants