Skip to content

Commit

Permalink
Configure rules for Rubocop
Browse files Browse the repository at this point in the history
After removing the gem 'scc-codestyle' (outdated version), Rubocop's
default configuration caused a lot of warnings/errors when linting the
project.

This commit adds rules to 'rubocop.yml' so that the current code passes
the linting process in the CI. Though I agree some of the rules are
important to keep a good style for the project, the idea is just to
adjust our CI process for Tumbleweed at the moment.
  • Loading branch information
lcaparroz committed Mar 20, 2024
1 parent 3886a70 commit 38f1f42
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions .rubocop.yml
Expand Up @@ -11,6 +11,105 @@ AllCops:
- package/*
- Rakefile

Layout/EmptyLineAfterGuardClause:
Enabled: false

Layout/EmptyLinesAroundMethodBody:
Enabled: false

Layout/EmptyLines:
Enabled: false

Layout/HashAlignment:
Enabled: false

Layout/LineLength:
Enabled: true
Max: 160

Lint/ErbNewArguments:
Enabled: false

Lint/MissingSuper:
Enabled: false

Lint/MixedRegexpCaptureTypes:
Enabled: false

Metrics/AbcSize:
Enabled: true
Max: 80

Metrics/BlockLength:
Enabled: false

Metrics/ClassLength:
Enabled: true
Max: 160

Metrics/MethodLength:
Enabled: true
Max: 50

Metrics/PerceivedComplexity:
Enabled: true
Max: 12

Naming/MethodParameterName:
Enabled: false

Naming/VariableNumber:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Style/ClassEqualityComparison:
Enabled: false

Style/Documentation:
Enabled: false

Style/ExpandPathArguments:
Enabled: false

Style/FormatString:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/HashTransformValues:
Enabled: false

Style/NumericPredicate:
Enabled: false

Style/ParenthesesAroundCondition:
Enabled: false

Style/RedundantBegin:
Enabled: false

Style/RedundantParentheses:
Enabled: false

Style/StringConcatenation:
Enabled: false

Style/TernaryParentheses:
Enabled: false

Style/WordArray:
Enabled: false

RSpec/AnyInstance:
Enabled: false

RSpec/ExampleLength:
Enabled: true
Max: 16

# Impossible to satisfy these rules in specs
RSpec/ExpectInHook:
Enabled: false
Expand Down

0 comments on commit 38f1f42

Please sign in to comment.