Skip to content

Instantly share code, notes, and snippets.

@kovalevsky
Created August 30, 2018 08:12
Show Gist options
  • Save kovalevsky/614954e816ce7917f89a4f156da8fa3c to your computer and use it in GitHub Desktop.
Save kovalevsky/614954e816ce7917f89a4f156da8fa3c to your computer and use it in GitHub Desktop.
HttpLab rubocop config sample
AllCops:
TargetRubyVersion: 2.5
Exclude:
- 'db/schema.rb'
- 'bin/*'
- 'ansible/**/*'
- '.git/**/*'
- 'node_modules/**/*'
- 'vendor/**/*'
- 'public/**/*'
Rails:
Enabled: true
Rails/FilePath:
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/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
h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment