Skip to content

Commit

Permalink
Fixes #37517 - Upgrade theforeman-rubocop gem to the v0.1.0
Browse files Browse the repository at this point in the history
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.

Update .rubocop_todo.yml file

Fix Style/TrailingCommaInHashLiteral cop

Fix cop Style/TrailingCommaInArrayLiteral

Fix Style/KeywordParametersOrder cop

Fix Style/ClassEqualityComparison cop

Fix Style/CommentAnnotation cop

Fix Style/RedundantAssignment cop

Fix Style/CaseLikeIf cop

Fix Lint/AmbiguousBlockAssociation offenses

Added parentheses around method calls in assert statements to resolve
ambiguous block associations as flagged by RuboCop.

Fix Naming/RescuedExceptionsVariableName

Fix Style/RegexpLiteral
  • Loading branch information
archanaserver authored and ianballou committed Nov 7, 2024
1 parent e83bdae commit 12b5a3d
Show file tree
Hide file tree
Showing 293 changed files with 1,378 additions and 1,104 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ruby.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
19 changes: 9 additions & 10 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -194,3 +187,9 @@ Style/RedundantFileExtensionInRequire:

Lint/MixedRegexpCaptureTypes:
Enabled: false

Style/OptionalBooleanParameter:
Enabled: false

Lint/RedundantCopDisableDirective:
Enabled: false
Loading

0 comments on commit 12b5a3d

Please sign in to comment.