Skip to content

Instantly share code, notes, and snippets.

@mcmire
Last active April 16, 2021 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcmire/747242f0f9db5268218732f35e5387e8 to your computer and use it in GitHub Desktop.
Save mcmire/747242f0f9db5268218732f35e5387e8 to your computer and use it in GitHub Desktop.
My Rubocop settings
---
AllCops:
Exclude:
- db/schema.rb
TargetRubyVersion: 3.0
Layout/ParameterAlignment:
EnforcedStyle: with_fixed_indentation
Layout/ClassStructure:
Enabled: true
Layout/DotPosition:
EnforcedStyle: trailing
Layout/CommentIndentation:
Enabled: false
Layout/InitialIndentation:
Enabled: false
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/HeredocIndentation:
Enabled: false
Layout/MultilineOperationIndentation:
EnforcedStyle: indented
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/SpaceInLambdaLiteral:
Enabled: false
Layout/SpaceInsideRangeLiteral:
Enabled: false
Layout/SpaceInsideStringInterpolation:
Enabled: false
Lint/AssignmentInCondition:
Enabled: false
Lint/SuppressedException:
Enabled: false
Lint/RequireParentheses:
Enabled: false
Metrics/AbcSize:
Max: 32
Metrics/BlockLength:
IgnoredMethods:
- context
- define
- describe
- it
- shared_context
- shared_examples
- shared_examples_for
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Max: 15
Layout/LineLength:
Max: 80
IgnoredPatterns:
- "^\\s*RSpec.describe"
- "^\\s*class [\\w:]+ < [\\w:]+"
- "^\\s*context"
- "^\\s*describe"
- "^\\s*it"
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/ParameterLists:
CountKeywordArgs: false
Metrics/PerceivedComplexity:
Max: 15
Naming/AccessorMethodName:
Enabled: false
Naming/BinaryOperatorParameterName:
Enabled: false
Naming/MemoizedInstanceVariableName:
EnforcedStyleForLeadingUnderscores: required
Naming/PredicateName:
ForbiddenPrefixes:
- is_
Exclude:
- spec/**/*
Naming/MethodParameterName:
Enabled: false
Style/AccessModifierDeclarations:
Enabled: false
Style/Alias:
Enabled: false
Style/BlockDelimiters:
EnforcedStyle: braces_for_chaining
Style/CollectionMethods:
Enabled: true
Style/Documentation:
Enabled: false
Style/EachWithObject:
Enabled: false
Style/EmptyElse:
Enabled: false
Style/EmptyMethod:
EnforcedStyle: expanded
Style/FormatString:
EnforcedStyle: percent
Style/FrozenStringLiteralComment:
Enabled: false
Style/GuardClause:
Enabled: false
Style/IfUnlessModifier:
Enabled: false
Style/Lambda:
Enabled: false
Style/LineEndConcatenation:
Enabled: false
Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/MultilineBlockChain:
Enabled: false
Style/NegatedIf:
Enabled: false
Style/NegatedWhile:
Enabled: false
Style/NumericPredicate:
Enabled: false
Style/OneLineConditional:
Enabled: false
Style/PercentLiteralDelimiters:
Enabled: false
Style/PreferredHashMethods:
Enabled: false
Style/RaiseArgs:
Enabled: false
Style/SafeNavigation:
Enabled: false
Style/Send:
Enabled: true
Style/SignalException:
Enabled: false
Style/SpecialGlobalVars:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/StringMethods:
Enabled: true
Style/SymbolArray:
Enabled: false
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: no_comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: no_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: no_comma
Style/RedundantCondition:
Enabled: false
Style/WhileUntilModifier:
Enabled: false
Style/WordArray:
Enabled: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment