rakvium/blog

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
require:
- rubocop-factory_bot
- rubocop-rails
- rubocop-rspec
- rubocop-rspec_rails
 
AllCops:
TargetRubyVersion: 3.3
DisplayCopNames: true
Exclude:
- 'db/migrate/**'
- 'db/schema.rb'
- 'node_modules/**/*'
- 'tmp/**/*'
- 'vendor/**/*'
NewCops: enable
 
################################## Layout #################################
Layout/LineLength:
Max: 120
 
################################## Metrics ################################
Metrics/AbcSize:
# Assignment Branch condition size
Max: 30
Metrics/BlockNesting:
# Configuration parameters: CountBlocks.
Max: 4
Metrics/BlockLength:
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
Exclude:
- 'config/**/*'
- 'spec/**/*'
Max: 120
Metrics/ClassLength:
Max: 200
Metrics/CyclomaticComplexity:
Max: 15
Metrics/MethodLength:
# Configuration parameters: CountComments.
Max: 15
Metrics/PerceivedComplexity:
Max: 15
 
################################## Rails ##################################
Rails:
Enabled: true
 
################################## RSpec ##################################
RSpec/DescribeClass:
Enabled: false
RSpec/ExampleLength:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/MultipleMemoizedHelpers: # new in 1.43
Max: 6
RSpec/NestedGroups:
Enabled: false
RSpec/NoExpectationExample: # NOTE: disabled due to shoulda-matchers usage
Enabled: false
 
################################## Style ##################################
Style/ClassAndModuleChildren:
# Disable checking compact/nesting class/modules style
Enabled: false
Style/Documentation:
# Disable documentations, leave it on the programmer’s conscience
Enabled: false
Style/MixinUsage:
Exclude:
- 'bin/*'
Style/StderrPuts:
Exclude:
- 'bin/*'