From 3895d450a1d7cd3ee4f7a8d8d020540e8dbf76cc Mon Sep 17 00:00:00 2001 From: akumari Date: Wed, 29 May 2024 19:57:31 +0530 Subject: [PATCH] Fixes #37517 - Upgrade theforeman-rubocop gem to the v0.1.0 Choose to inherit `lenient.yml` from `theforeman-rubocop` style, because that it matches to the rubocop style this repo follows. Also dropped `Rails` and `Style/Documentation` cops because that already exist in the lenient style we now follow. --- .github/workflows/ruby.yml | 2 ++ .rubocop.yml | 13 +++---------- gemfile.d/test.rb | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 1f69a4bf6c0..9edd0cb76f4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -16,6 +16,8 @@ jobs: rubocop: name: Rubocop uses: theforeman/actions/.github/workflows/rubocop.yml@v0 + with: + command: bundle exec rubocop --parallel --format github test: name: Ruby diff --git a/.rubocop.yml b/.rubocop.yml index de1be94cf3d..022116337e9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,15 +1,11 @@ -require: - - rubocop-performance - - rubocop-rails - - rubocop-minitest - # TODO: Remove the following once the rules in the file is addressed inherit_from: - .rubocop_todo.yml # end TODO -Rails: - Enabled: true +inherit_gem: + theforeman-rubocop: + - lenient.yml Rails/ContentTag: Enabled: false @@ -88,9 +84,6 @@ Style/RedundantSelf: Style/RedundantReturn: Enabled: false -Style/Documentation: - Enabled: false # don't require documentation - Style/Encoding: Enabled: false # don't require utf-8 encoding on every file diff --git a/gemfile.d/test.rb b/gemfile.d/test.rb index a4e052f4d5e..163a21b7438 100644 --- a/gemfile.d/test.rb +++ b/gemfile.d/test.rb @@ -1,4 +1,4 @@ group :test do gem "vcr", "~> 6.1" - gem 'theforeman-rubocop', '~> 0.0.6', require: false + gem 'theforeman-rubocop', '~> 0.1.0', require: false end