Skip to content

Commit

Permalink
Update RuboCop configuration to inherit from theforeman-rubocop
Browse files Browse the repository at this point in the history
- Added `theforeman-rubocop` as a development dependency in the gemspec.
- Changed the RuboCop configuration to inherit from `default.yml`
provided by `theforeman-rubocop` for better style alignment.
- Removed redundant cops as they are already included in the inherited
`defsault.yml` or not needed anymore.
  • Loading branch information
archanaserver authored and evgeni committed Jul 1, 2024
1 parent 4fa1231 commit 6e542fa
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 169 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 3 additions & 21 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-performance
- rubocop-rails
- rubocop-minitest
inherit_gem:
theforeman-rubocop:
- default.yml

AllCops:
TargetRubyVersion: 2.7
Expand All @@ -12,26 +11,9 @@ AllCops:
- 'node_modules/**/*'
- 'vendor/**/*'

Layout/ArgumentAlignment:
EnforcedStyle: with_fixed_indentation
IndentationWidth: 2

Layout/EmptyLineAfterGuardClause:
Enabled: false

Layout/LineLength:
Enabled: 111 # TODO: discuss and set this

Rails:
Enabled: true

Style/Alias:
EnforcedStyle: prefer_alias_method

# Don't enforce documentation
Style/Documentation:
Enabled: false

# Don't enforce frozen string literals
Style/FrozenStringLiteralComment:
Enabled: false
Expand Down
Loading

0 comments on commit 6e542fa

Please sign in to comment.