Skip to content

Instantly share code, notes, and snippets.

@kovalevsky
Created February 15, 2019 10:46
Show Gist options
  • Save kovalevsky/24b8a373afe559eaffc384170046686e to your computer and use it in GitHub Desktop.
Save kovalevsky/24b8a373afe559eaffc384170046686e to your computer and use it in GitHub Desktop.
GMB rubocop config
AllCops:
TargetRubyVersion: 2.5
Exclude:
- 'db/schema.rb'
- 'bin/*'
- 'ansible/**/*'
- '.git/**/*'
- 'node_modules/**/*'
- 'vendor/**/*'
- 'public/**/*'
Rails:
Enabled: true
Rails/HasAndBelongsToMany:
Enabled: false
Rails/BulkChangeTable:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/ConditionalAssignment:
Enabled: false
Naming/UncommunicativeMethodParamName:
Enabled: false
Metrics/ModuleLength:
Max: 150
Metrics/LineLength:
Max: 120
IgnoredPatterns: ['^\s{0,}\#']
Metrics/MethodLength:
Max: 35
Metrics/ClassLength:
Max: 200
Metrics/BlockLength:
CountComments: false
Max: 40
Exclude:
- 'Rakefile'
- '**/*.rake'
- 'spec/**/*.rb'
- 'config/initializers/*.rb'
- 'config/environments/*.rb'
- 'config/routes.rb'
- 'Gemfile'
- 'db/migrate/*.rb'
Metrics/AbcSize:
Max: 30
# In some circumstances it may be appropriate to relax the restriction and permit modules with a complexity as high as 15
# https://en.wikipedia.org/wiki/Cyclomatic_complexity
Metrics/CyclomaticComplexity:
Max: 15
Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: indented
Layout/MultilineOperationIndentation:
Enabled: true
EnforcedStyle: indented
Layout/MultilineHashBraceLayout:
Enabled: true
EnforcedStyle: symmetrical
Layout/MultilineArrayBraceLayout:
Enabled: true
EnforcedStyle: symmetrical
Layout/AlignParameters:
EnforcedStyle: with_fixed_indentation
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/FirstParameterIndentation:
EnforcedStyle: consistent
Layout/MultilineMethodCallBraceLayout:
EnforcedStyle: new_line
Style/ClassAndModuleChildren:
Enabled: false
Style/Documentation:
Enabled: false
Style/FormatStringToken:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/NumericLiteralPrefix:
Enabled: false
Style/NumericPredicate:
Enabled: false
# Style/RedundantSelf:
# Enabled: false
Style/StringLiterals:
Enabled: false
Style/TernaryParentheses:
# EnforcedStyle: require_parentheses_when_complex
Enabled: false
Lint/BooleanSymbol:
Enabled: false
Bundler/OrderedGems:
Enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment