Skip to content

Commit

Permalink
Use theforeman-rubocop gem
Browse files Browse the repository at this point in the history
Choose to inherit from lenient.yml, because wanted to inherit rules
from style_lenient.yml as well, i followed this:
https://github.com/theforeman/theforeman-rubocop?tab=readme-ov-file#not-intrusive-style---lenient

Also drop some cops from the .rubocop.yml config, because that was
present in inherit-gem and added theforeman-rubocop gem.

This is part of Rubocop standerdization, link for the reference:
https://community.theforeman.org/t/standardizing-rubocop-with-theforeman-rubocop/37239
  • Loading branch information
archanaserver committed Jun 10, 2024
1 parent f837f5a commit 2524b4b
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 146 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
rubocop:
name: Rubocop
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
with:
command: bundle exec rubocop --parallel --format github

test:
name: Tests
Expand Down
16 changes: 4 additions & 12 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# TODO: remove this
inherit_from: .rubocop_todo.yml

inherit_gem:
theforeman-rubocop:
- lenient.yml

AllCops:
TargetRubyVersion: 2.7

MethodLength:
Description: 'Avoid methods longer than 30 lines of code.'
Max: 30 # default is 10

Documentation:
Enabled: false

StringLiterals:
Enabled: false

HashSyntax:
Enabled: false

Expand Down Expand Up @@ -71,12 +69,6 @@ RedundantReturn:
SingleLineBlockParams:
Enabled: false

FormatString:
Enabled: false # we use % for i18n

Style/Alias:
Enabled: false

Style/MultilineMethodCallBraceLayout:
Enabled: false

Expand Down
Loading

0 comments on commit 2524b4b

Please sign in to comment.