Skip to content

Commit

Permalink
Add layout, metrics, naming and style rules to the rubocop configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmurach committed Nov 12, 2023
1 parent cf0b2f3 commit bf6c3ea
Showing 1 changed file with 44 additions and 23 deletions.
67 changes: 44 additions & 23 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,76 @@ AllCops:
NewCops: enable
TargetRubyVersion: 2.0

Gemspec/DevelopmentDependencies:
Enabled: false

Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent

Layout/FirstHashElementIndentation:
EnforcedStyle: consistent

Layout/LineLength:
Max: 80

Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space

Lint/AssignmentInCondition:
Enabled: false

Metrics/AbcSize:
Max: 35
AllowedMethods:
- split_into_words

Metrics/BlockLength:
CountComments: true
Max: 32
IgnoredMethods: []
Exclude:
- "spec/**/*"
- "**/spec/**/*"
- "**/*.gemspec"

Metrics/ClassLength:
Max: 1500
Max: 150

Metrics/CyclomaticComplexity:
Enabled: false
AllowedMethods:
- split_into_words

Metrics/MethodLength:
Max: 20
AllowedMethods:
- split_into_words

Naming/BinaryOperatorParameterName:
Enabled: false
Metrics/PerceivedComplexity:
Max: 5
AllowedMethods:
- split_into_words

Style/AccessorGrouping:
Enabled: false
Naming/FileName:
Exclude:
- "lib/strings-case.rb"

Style/BlockDelimiters:
AllowedMethods:
- expect
- let

Style/AsciiComments:
Style/CommentedKeyword:
Enabled: false

Style/LambdaCall:
EnforcedStyle: braces
Style/FetchEnvVar:
AllowedVars:
- COVERAGE

Style/FormatString:
EnforcedStyle: percent

Style/StringLiterals:
EnforcedStyle: double_quotes

Style/TrivialAccessors:
Style/NegatedWhile:
Enabled: false

# { ... } for multi-line blocks is okay
Style/BlockDelimiters:
Style/ParallelAssignment:
Enabled: false

Style/CommentedKeyword:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes

0 comments on commit bf6c3ea

Please sign in to comment.