Retrospring/.rubocop.yml

134 lines
2.2 KiB
YAML
Raw Normal View History

require:
2022-01-14 16:39:35 -08:00
- rubocop-rails
2015-07-20 19:14:16 -07:00
AllCops:
DisplayCopNames: true
CacheRootDirectory: '.git'
2015-07-20 19:14:16 -07:00
Exclude:
2022-01-14 16:39:35 -08:00
- 'config/**/*'
2015-07-20 19:14:16 -07:00
- 'vendor/**/*'
- 'db/schema.rb'
2022-01-14 16:39:35 -08:00
- 'db/seeds.rb'
- 'bin/**/*'
- 'node_modules/**/*'
- coverage/**/*
TargetRubyVersion: 3.1
NewCops: enable
2015-07-20 19:14:16 -07:00
2022-01-14 16:39:35 -08:00
Rails:
Enabled: true
Rails/InverseOf:
2015-07-20 19:14:16 -07:00
Enabled: false
### Lint
Lint/NestedMethodDefinition:
Exclude:
- api/sinatra/**/*
### Metrics
2022-01-14 16:39:35 -08:00
Metrics/AbcSize:
Max: 20
Exclude:
- 'db/**/*'
2020-04-19 12:47:19 -07:00
Layout/LineLength:
2015-07-20 19:14:16 -07:00
Enabled: false
Metrics/MethodLength:
2022-01-14 16:39:35 -08:00
Max: 15
Exclude:
- 'db/migrate/*.rb'
2015-07-20 19:14:16 -07:00
Metrics/BlockLength:
Exclude:
- '*.gemspec'
- '**/*.rake'
- 'api/**/*'
- 'app/api/routes.rb'
- 'config/initialize/**/*'
- 'config/initializers/**/*'
- 'spec/**/*'
Metrics/ClassLength:
Exclude:
- spec/**/*
Metrics/CyclomaticComplexity:
Severity: refactor
Metrics/ModuleLength:
Exclude:
- 'app/api/routes.rb'
- 'spec/requests/**/*'
### Style / Layout
#### Hash
Layout/HashAlignment:
EnforcedColonStyle: table
EnforcedHashRocketStyle: table
Style/HashSyntax:
EnforcedStyle: ruby19_no_mixed_keys
Style/HashTransformKeys:
2015-07-20 19:14:16 -07:00
Enabled: false
Style/HashTransformValues:
Enabled: false
Layout/MultilineOperationIndentation:
Description: Checks indentation of binary operations that span more than one line.
EnforcedStyle: indented
#### Rest
2015-07-20 19:14:16 -07:00
Style/Documentation:
Enabled: false
2022-01-14 16:39:35 -08:00
Style/DoubleNegation:
Enabled: false
Style/ExponentialNotation:
# https://docs.rubocop.org/rubocop/cops_style.html#styleexponentialnotation
EnforcedStyle: engineering
Style/NumericLiterals:
Description: Add underscores to large numeric literals to improve their readability.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#underscores-in-numerics
Enabled: false
Style/PerlBackrefs:
Enabled: false
Style/RaiseArgs:
EnforcedStyle: compact
Style/RegexpLiteral:
Enabled: false
Style/SignalException:
EnforcedStyle: only_raise
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/OptionalBooleanParameter:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
2022-01-14 16:39:35 -08:00
Style/RescueStandardError:
Enabled: false
Style/Encoding:
2022-06-21 11:04:06 -07:00
Enabled: false
2022-12-07 23:20:45 -08:00
Style/EndlessMethod:
EnforcedStyle: allow_always