.rubocop_core.yml
---
# Last updated to rubocop 1.45.1
AllCops:
Include:
- '/**/*.arb'
- '/**/*.axlsx'
- '/**/*.builder'
- '/**/*.fcgi'
- '/**/*.gemfile'
- '/**/*.gemspec'
- '/**/*.god'
- '/**/*.jb'
- '/**/*.jbuilder'
- '/**/*.mspec'
- '/**/*.opal'
- '/**/*.pluginspec'
- '/**/*.podspec'
- '/**/*.rabl'
- '/**/*.rake'
- '/**/*.rb'
- '/**/*.rbuild'
- '/**/*.rbw'
- '/**/*.rbx'
- '/**/*.ru'
- '/**/*.ruby'
- '/**/*.spec'
- '/**/*.thor'
- '/**/*.watchr'
- '/**/*Fastfile'
- '/**/.irbrc'
- '/**/.pryrc'
- '/**/.simplecov'
- '/**/Appraisals'
- '/**/Berksfile'
- '/**/Brewfile'
- '/**/Buildfile'
- '/**/Capfile'
- '/**/Cheffile'
- '/**/Dangerfile'
- '/**/Deliverfile'
- '/**/Fastfile'
- '/**/Gemfile'
- '/**/Guardfile'
- '/**/Jarfile'
- '/**/Mavenfile'
- '/**/Podfile'
- '/**/Puppetfile'
- '/**/Rakefile'
- '/**/Snapfile'
- '/**/Steepfile'
- '/**/Thorfile'
- '/**/Vagabondfile'
- '/**/Vagrantfile'
- '/**/buildfile'
- '/**/config.ru'
- '/**/rakefile'
Exclude:
- '/**/*.gemspec'
- '/**/admin/**/*.rb'
- '/**/config/deploy.rb'
- '/**/config/unicorn.rb'
- '/**/db/migrate/**/*'
- '/**/db/schema.rb'
- '/**/node_modules/**/*'
- '/**/spec/dummy/**/*'
- '/**/vendor/**/*'
- '/**/.git/**/*'
- '/**/bin/rails'
- '/**/bin/rake'
- '/**/bin/spring'
- '/**/dist/**/*'
- '/**/log/**/*'
- '/**/tmp/**/*'
ActiveSupportExtensionsEnabled: false
DefaultFormatter: 'fuubar'
DisplayCopNames: true
################################################################################
# BUNDLER
################################################################################
Bundler/GemComment:
Enabled: false
IgnoredGems: []
OnlyFor: []
Bundler/GemFilename:
Enabled: true
EnforcedStyle: 'Gemfile'
Include:
- '/**/Gemfile'
- '/**/gems.rb'
- '/**/Gemfile.lock'
- '/**/gems.locked'
Bundler/GemVersion:
Enabled: true
EnforcedStyle: 'required'
Include:
- '/**/*.gemfile'
- '/**/Gemfile'
- '/**/gems.rb'
AllowedGems: []
Bundler/DuplicatedGem:
Enabled: true
Bundler/InsecureProtocolSource:
Enabled: true
AllowHttpProtocol: false
Bundler/OrderedGems:
Enabled: true
TreatCommentsAsGroupSeparators: true
ConsiderPunctuation: false
################################################################################
# GEMSPEC
################################################################################
Gemspec/DependencyVersion:
Enabled: true
EnforcedStyle: 'required'
AllowedGems: []
Include:
- '**/*.gemspec'
Gemspec/DeprecatedAttributeAssignment:
Enabled: true
Include:
- '/**/*.gemspec'
Gemspec/DevelopmentDependencies:
Enabled: true
EnforcedStyle: "gemspec"
AllowedGems:
- "bundler"
Include:
- "**/*.gemspec"
- "**/Gemfile"
- "**/gems.rb"
Gemspec/DuplicatedAssignment:
Enabled: true
Gemspec/OrderedDependencies:
Enabled: true
TreatCommentsAsGroupSeparators: true
ConsiderPunctuation: false
Gemspec/RequiredRubyVersion:
Enabled: true
Gemspec/RequireMFA:
Enabled: true
Gemspec/RubyVersionGlobalsUsage:
Enabled: true
################################################################################
# LAYOUT
################################################################################
Layout/AccessModifierIndentation:
Enabled: true
EnforcedStyle: 'indent'
IndentationWidth: ~
Layout/ArgumentAlignment:
Enabled: true
EnforcedStyle: 'with_first_argument'
Exclude:
- '/**/Gemfile'
Layout/ArrayAlignment:
Enabled: true
Layout/AssignmentIndentation:
Enabled: true
IndentationWidth: ~
Layout/BeginEndAlignment:
Enabled: true
EnforcedStyleAlignWith: 'begin'
Layout/BlockAlignment:
Enabled: true
EnforcedStyleAlignWith: 'either'
Exclude:
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
- '/**/app/controllers/**/*.rb'
Layout/BlockEndNewline:
Enabled: true
Layout/CaseIndentation:
Enabled: true
EnforcedStyle: 'end'
IndentOneStep: false
IndentationWidth: ~
Layout/ClassStructure:
Enabled: true
ExpectedOrder:
- 'modules'
- 'constants'
- 'class_attribute_macros'
- 'public_attribute_macros'
- 'public_delegate'
- 'serialize'
- 'relationships'
- 'scopes'
- 'validations'
- 'callbacks'
- 'accepts_nested_attributes_for'
- 'protect_from_forgery'
- 'layout'
- 'friendly_id'
- 'geocoded_by'
- 'has_attached_file'
- 'has_attached_files'
- 'has_one_attached'
- 'has_many_attached'
- 'states'
- 'state_transitions'
- 'public_class_methods'
- 'initializer'
- 'public_methods'
- 'protected_attribute_macros'
- 'protected_methods'
- 'private_attribute_macros'
- 'private_delegate'
- 'private_methods'
Categories:
attribute_macros:
- 'attr_accessor'
- 'attr_reader'
- 'attr_writer'
callbacks:
- 'before_action'
- 'before_validation'
- 'after_validation'
- 'before_save'
- 'before_create'
- 'after_action'
- 'after_create'
- 'after_save'
- 'after_commit'
class_attribute_macros:
- 'cattr_accessor'
- 'cattr_reader'
- 'cattr_writer'
modules:
- 'prepend'
- 'include'
- 'extend'
relationships:
- 'belongs_to'
- 'has_one'
- 'has_many'
- 'has_and_belongs_to_many'
scopes:
- 'default_scope'
- 'scope'
validations:
- 'validates'
- 'validate'
Layout/ClosingHeredocIndentation:
Enabled: true
Layout/ClosingParenthesisIndentation:
Enabled: true
Layout/CommentIndentation:
Enabled: true
Exclude:
- '/**/config/initializers/middleware.rb'
Layout/ConditionPosition:
Enabled: true
Layout/DefEndAlignment:
Enabled: true
EnforcedStyleAlignWith: 'start_of_line'
AutoCorrect: true
Layout/DotPosition:
Enabled: true
EnforcedStyle: 'leading'
Layout/ElseAlignment:
Enabled: true
Layout/EmptyComment:
Enabled: true
AllowBorderComment: true
AllowMarginComment: true
Layout/EmptyLineAfterGuardClause:
Enabled: true
Layout/EmptyLineAfterMagicComment:
Enabled: true
Layout/EmptyLineAfterMultilineCondition:
Enabled: true
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
AllowAliasSyntax: false
AllowedMethods:
- 'public'
- 'protected'
- 'private'
Layout/EmptyLineBetweenDefs:
Enabled: true
AllowAdjacentOneLineDefs: true
EmptyLineBetweenClassDefs: true
EmptyLineBetweenMethodDefs: true
EmptyLineBetweenModuleDefs: true
NumberOfEmptyLines: 1
Layout/EmptyLinesAroundAccessModifier:
Enabled: true
EnforcedStyle: 'around'
Layout/EmptyLinesAroundArguments:
Enabled: true
Layout/EmptyLinesAroundBeginBody:
Enabled: true
Layout/EmptyLinesAroundBlockBody:
Enabled: true
EnforcedStyle: 'no_empty_lines'
Exclude:
- '/**/engine.rb'
- '/**/spec/**/*.rb'
Layout/EmptyLinesAroundClassBody:
Enabled: true
EnforcedStyle: 'no_empty_lines'
Layout/EmptyLinesAroundExceptionHandlingKeywords:
Enabled: true
Layout/EmptyLinesAroundMethodBody:
Enabled: true
Layout/EmptyLinesAroundModuleBody:
Enabled: true
EnforcedStyle: 'no_empty_lines'
Layout/EmptyLines:
Enabled: true
Layout/EndAlignment:
Enabled: true
EnforcedStyleAlignWith: 'keyword'
AutoCorrect: true
Layout/EndOfLine:
Enabled: true
EnforcedStyle: 'lf'
Layout/ExtraSpacing:
Enabled: true
AllowBeforeTrailingComments: true
AllowForAlignment: true
ForceEqualSignAlignment: true
Exclude:
- '/**/Gemfile'
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
Layout/FirstArgumentIndentation:
Enabled: true
EnforcedStyle: 'consistent_relative_to_receiver'
IndentationWidth: ~
Layout/FirstArrayElementIndentation:
Enabled: true
EnforcedStyle: 'align_brackets'
IndentationWidth: ~
Layout/FirstArrayElementLineBreak:
Enabled: true
AllowMultilineFinalElement: false
Layout/FirstHashElementIndentation:
Enabled: true
EnforcedStyle: 'special_inside_parentheses'
IndentationWidth: ~
Layout/FirstHashElementLineBreak:
Enabled: true
AllowMultilineFinalElement: false
Layout/FirstMethodArgumentLineBreak:
# Disallows: my_method(foo,
# bar)
Enabled: false
AllowMultilineFinalElement: false
Layout/FirstMethodParameterLineBreak:
# Disallows: def my_method(foo,
# bar)
Enabled: false
AllowMultilineFinalElement: false
Layout/FirstParameterIndentation:
Enabled: true
EnforcedStyle: 'align_parentheses'
Layout/HashAlignment:
Enabled: true
EnforcedHashRocketStyle: 'table'
EnforcedColonStyle: 'table'
EnforcedLastArgumentHashStyle: 'always_inspect'
Layout/HeredocArgumentClosingParenthesis:
Enabled: true
Layout/HeredocIndentation:
Enabled: true
Layout/IndentationConsistency:
Enabled: true
EnforcedStyle: 'normal'
Layout/IndentationStyle:
Enabled: true
EnforcedStyle: 'spaces'
Layout/IndentationWidth:
Enabled: true
Width: 2
AllowedPatterns:
- '^\s*(module|class)'
Layout/InitialIndentation:
Enabled: true
Layout/LeadingCommentSpace:
Enabled: true
Layout/LeadingEmptyLines:
Enabled: true
Layout/LineContinuationLeadingSpace:
Enabled: true
EnforcedStyle: 'trailing'
Layout/LineContinuationSpacing:
Enabled: true
EnforcedStyle: 'space'
Layout/LineEndStringConcatenationIndentation:
Enabled: true
EnforcedStyle: 'aligned'
IndentationWidth: ~
# yamllint disable rule:line-length
Layout/LineLength:
Enabled: true
Max: 90
AllowHeredoc: true
AllowURI: true
IgnoreCopDirectives: true
AllowedPatterns:
- "\\s+raise_error\\([^)]+\\)$" # raise_error(LongClassName)
- "^(\\s+|.*)'[^']+'\\s+=\\>\\s+'[^']+',$" # 'foo' => 'really_long_string',
- "^(\\s+|.*)'[^']+'\\s+=\\>\\s+:\\w+,$" # 'foo' => :really_long_symbol,
- "^(\\s+|.*)'[^']+'\\s+=\\>\\s+\\\"[^\\\"]+\\\",$" # 'foo' => "really_long_string",
- "^(\\s+|.*)'[^']+'\\s+=\\>\\s+match\\(.*\\)," # 'foo' => match(/really_long_regex/),
- "^(\\s+|.*):[\\w_]+\\s+=\\>\\s+'[^']+',$" # :foo => 'really_long_string',
- "^(\\s+|.*):[\\w_]+\\s+=\\>\\s+\\\"[^\\\"]+\\\",$" # :foo => "really_long_string",
- "^(\\s+|.*)[\\w_]+:\\s+'[^']+',$" # foo: 'really_long_string',
- "^(\\s+|.*)[\\w_]+:\\s+\\\"[^\\\"]+\\\",$" # foo: "really_long_string",
- "^\\s*(fail|raise)\\s+" # fail or raise an exception
- "^\\s*class\\s+" # class definition with really long inherited class
- "^\\s*require\\s+'[^']+'$" # require 'some_really_long_path_name'
- "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+%[qQ]{[^}]+}$" # RSpec expectation line for a string with %q syntax
- "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+'[^']+'$" # RSpec expectation line for a single-quoted string
- "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+:\\w+$" # RSpec expectation line for a Symbol
- "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+Time\\.(new|utc).*" # RSpec expectation line for a Time
- "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+[^\\s]+\\s+\\\"[^\\\"]+\\\"$" # RSpec expectation line for a double-quoted string
- "^\\s+expect\\([^\\)]+\\)+\\.(not_)?to\\s+match\\(/[^/]+/\\)$" # RSpec expectation line for a regex
- "^\\s+return\\s+.*(if|unless)" # Short circuiting returns
- '^\s*((private|public|protected)\s+)?def\s+[\w\._]+\(?' # Method definitions
- '^\s*shared_examples\s+.*' # RSpec shared_examples lines
- '^\s+belongs_to\s+.*' # Rails belongs_to relationships
- '^\s+broadcast[\s\\(].*' # Wisper Broadcasts
- '^\s+context\s+.*' # RSpec context lines
- '^\s+describe\s+.*' # RSpec describe lines
- '^\s+expose\(:[\w_]+\)\s+\{.*' # Controller exposures
- '^\s+factory\s+.*' # FactoryBot factory definitions
- '^\s+has_many\s+.*' # Rails has_many relationships
- '^\s+has_one\s+.*' # Rails has_one relationships
- '^\s+it\s+.*' # RSpec it lines
- '^\s+let\(:[\w_]+\)\s+\{.*' # RSpec lets on single line
- '^\s+scope\s+.*' # Rails scopes
URISchemes:
- 'http'
- 'https'
Exclude:
- '/**/Gemfile'
- '/**/config/environments/**/*'
- '/**/config/initializers/**/*'
- '/**/config/routes.rb'
- '/**/db/sample.rb'
- '/**/db/scrub.rb'
- '/**/db/seed.rb'
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
# yamllint enable rule:line-length
Layout/MultilineArrayBraceLayout:
Enabled: true
EnforcedStyle: 'symmetrical'
Layout/MultilineArrayLineBreaks:
Enabled: true
AllowMultilineFinalElement: false
Layout/MultilineAssignmentLayout:
Enabled: true
EnforcedStyle: 'same_line'
Layout/MultilineBlockLayout:
Enabled: true
Layout/MultilineHashBraceLayout:
Enabled: true
EnforcedStyle: 'symmetrical'
Layout/MultilineHashKeyLineBreaks:
Enabled: true
AllowMultilineFinalElement: false
Layout/MultilineMethodArgumentLineBreaks:
Enabled: true
AllowMultilineFinalElement: false
Exclude:
- '/**/Gemfile'
- '/**/config/routes.rb'
Layout/MultilineMethodCallBraceLayout:
Enabled: true
EnforcedStyle: 'symmetrical'
Layout/MultilineMethodCallIndentation:
Enabled: true
EnforcedStyle: 'indented_relative_to_receiver'
IndentationWidth: ~
Layout/MultilineMethodDefinitionBraceLayout:
Enabled: true
EnforcedStyle: 'symmetrical'
Layout/MultilineMethodParameterLineBreaks:
Enabled: true
AllowMultilineFinalElement: false
Layout/MultilineOperationIndentation:
# Disallows: @expires_at ||= Time.now.utc +
# 60
Enabled: false
EnforcedStyle: 'aligned'
IndentationWidth: ~
Layout/ParameterAlignment:
Enabled: true
EnforcedStyle: 'with_first_parameter'
IndentationWidth: ~
Exclude:
- '/**/Gemfile'
# OFtentimes when chaning it makes sense to split multiple things across lines.
Layout/RedundantLineBreak:
Enabled: false
InspectBlocks: true
Layout/RescueEnsureAlignment:
Enabled: true
Layout/SingleLineBlockChain:
Enabled: true
Layout/SpaceAfterColon:
Enabled: true
Layout/SpaceAfterComma:
Enabled: true
Layout/SpaceAfterMethodName:
Enabled: true
Layout/SpaceAfterNot:
Enabled: true
Layout/SpaceAfterSemicolon:
Enabled: true
Layout/SpaceAroundBlockParameters:
Enabled: true
EnforcedStyleInsidePipes: 'no_space'
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true
EnforcedStyle: 'space'
Layout/SpaceAroundKeyword:
Enabled: true
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Layout/SpaceAroundOperators:
Enabled: true
AllowForAlignment: true
EnforcedStyleForExponentOperator: 'no_space'
Layout/SpaceBeforeBlockBraces:
Enabled: true
EnforcedStyle: 'space'
Layout/SpaceBeforeBrackets:
Enabled: true
Layout/SpaceBeforeComma:
Enabled: true
Layout/SpaceBeforeComment:
Enabled: true
Layout/SpaceBeforeFirstArg:
Enabled: true
AllowForAlignment: true
Exclude:
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
Layout/SpaceBeforeSemicolon:
Enabled: true
Layout/SpaceInLambdaLiteral:
Enabled: true
EnforcedStyle: 'require_no_space'
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: true
EnforcedStyle: 'no_space'
EnforcedStyleForEmptyBrackets: 'no_space'
Layout/SpaceInsideArrayPercentLiteral:
Enabled: true
Layout/SpaceInsideBlockBraces:
Enabled: true
EnforcedStyle: 'space'
EnforcedStyleForEmptyBraces: 'no_space'
SpaceBeforeBlockParameters: true
Layout/SpaceInsideHashLiteralBraces:
Enabled: true
EnforcedStyle: 'space'
EnforcedStyleForEmptyBraces: 'no_space'
Layout/SpaceInsideParens:
Enabled: true
EnforcedStyle: 'no_space'
Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: true
Layout/SpaceInsideRangeLiteral:
Enabled: true
Layout/SpaceInsideReferenceBrackets:
Enabled: true
EnforcedStyle: 'no_space'
EnforcedStyleForEmptyBrackets: 'no_space'
Layout/SpaceInsideStringInterpolation:
Enabled: true
EnforcedStyle: 'no_space'
Layout/TrailingEmptyLines:
Enabled: true
EnforcedStyle: 'final_newline'
Layout/TrailingWhitespace:
Enabled: true
AllowInHeredoc: false
################################################################################
# LINTS
################################################################################
Lint/AmbiguousAssignment:
Enabled: true
Lint/AmbiguousBlockAssociation:
Enabled: true
AllowedMethods: []
Exclude:
- '/**/app/models/**/*.rb'
- '/**/spec/**/*_spec.rb'
Lint/AmbiguousOperator:
Enabled: true
Lint/AmbiguousOperatorPrecedence:
Enabled: true
Lint/AmbiguousRange:
Enabled: true
RequireParenthesesForMethodChains: true
Lint/AmbiguousRegexpLiteral:
Enabled: true
Lint/AssignmentInCondition:
Enabled: true
AllowSafeAssignment: true
Lint/BigDecimalNew:
Enabled: true
Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true
Lint/BooleanSymbol:
Enabled: true
Lint/CircularArgumentReference:
Enabled: true
Lint/ConstantDefinitionInBlock:
Enabled: true
AllowedMethods:
- 'enums'
Lint/ConstantOverwrittenInRescue:
Enabled: true
Lint/ConstantResolution:
Enabled: false
Only: []
Ignore:
- 'ENV'
Lint/Debugger:
Enabled: true
Lint/DeprecatedClassMethods:
Enabled: true
Lint/DeprecatedConstants:
Enabled: true
Lint/DeprecatedOpenSSLConstant:
Enabled: true
Lint/DisjunctiveAssignmentInConstructor:
Enabled: true
Lint/DuplicateBranch:
Enabled: true
IgnoreLiteralBranches: true
IgnoreConstantBranches: true
Lint/DuplicateElsifCondition:
Enabled: true
Lint/DuplicateHashKey:
Enabled: true
Lint/DuplicateMagicComment:
Enabled: true
Lint/DuplicateMethods:
Enabled: true
Lint/DuplicateRegexpCharacterClassElement:
Enabled: true
Lint/DuplicateRequire:
Enabled: true
Lint/DuplicateRescueException:
Enabled: true
Lint/EachWithObjectArgument:
Enabled: true
Lint/ElseLayout:
Enabled: true
Lint/EmptyClass:
Enabled: true
AllowComments: false
Lint/EmptyConditionalBody:
Enabled: true
AllowComments: false
Lint/EmptyEnsure:
Enabled: true
Lint/EmptyFile:
Enabled: true
Lint/EmptyInPattern:
Enabled: true
AllowComments: true
Lint/EmptyInterpolation:
Enabled: true
Lint/EmptyWhen:
Enabled: true
AllowComments: true
Lint/EnsureReturn:
Enabled: true
Lint/ErbNewArguments:
Enabled: true
Lint/FlipFlop:
Enabled: true
Lint/FloatComparison:
Enabled: true
Lint/FloatOutOfRange:
Enabled: true
Lint/FormatParameterMismatch:
Enabled: true
Lint/HashCompareByIdentity:
Enabled: true
Lint/HeredocMethodCallPosition:
Enabled: true
Lint/IdentityComparison:
Enabled: true
Lint/ImplicitStringConcatenation:
Enabled: true
Lint/IncompatibleIoSelectWithFiberScheduler:
Enabled: true
Lint/IneffectiveAccessModifier:
Enabled: true
Lint/InheritException:
Enabled: true
EnforcedStyle: 'standard_error'
Lint/LambdaWithoutLiteralBlock:
Enabled: true
Lint/LiteralAsCondition:
Enabled: true
Lint/LiteralInInterpolation:
Enabled: true
Lint/Loop:
Enabled: true
Lint/MissingCopEnableDirective:
Enabled: true
Lint/MissingSuper:
Enabled: true
Lint/MixedRegexpCaptureTypes:
Enabled: true
Lint/MultipleComparison:
Enabled: true
Lint/NestedMethodDefinition:
Enabled: true
Lint/NonAtomicFileOperation:
Enabled: true
Lint/NonDeterministicRequireOrder:
Enabled: true
Lint/NonLocalExitFromIterator:
Enabled: true
Lint/NoReturnInBeginEndBlocks:
Enabled: true
Lint/NumberConversion:
Enabled: false
AllowedMethods:
- 'ago'
- 'from_now'
- 'second'
- 'seconds'
- 'minute'
- 'minutes'
- 'hour'
- 'hours'
- 'day'
- 'days'
- 'week'
- 'weeks'
- 'fortnight'
- 'fortnights'
- 'in_milliseconds'
IgnoredClasses:
- 'Time'
- 'DateTime'
Lint/NumberedParameterAssignment:
Enabled: true
Lint/OrAssignmentToConstant:
Enabled: true
Lint/OrderedMagicComments:
Enabled: true
Lint/OutOfRangeRegexpRef:
Enabled: true
Lint/ParenthesesAsGroupedExpression:
Enabled: true
Lint/PercentStringArray:
Enabled: true
Lint/PercentSymbolArray:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/RandOne:
Enabled: true
Lint/RedundantCopDisableDirective:
Enabled: true
Lint/RedundantCopEnableDirective:
Enabled: true
Lint/RedundantDirGlobSort:
Enabled: true
Lint/RedundantRequireStatement:
Enabled: true
Lint/RedundantSafeNavigation:
Enabled: true
AllowedMethods:
- 'eql?'
- 'equal?'
- 'instance_of?'
- 'is_a?'
- 'kind_of?'
- 'respond_to?'
Lint/RedundantSplatExpansion:
Enabled: true
AllowPercentLiteralArrayArgument: false
Lint/RedundantStringCoercion:
Enabled: true
Lint/RedundantWithIndex:
Enabled: true
Lint/RedundantWithObject:
Enabled: true
Lint/RefinementImportMethods:
Enabled: true
Lint/RequireParentheses:
Enabled: true
Lint/RequireRangeParentheses:
Enabled: true
Lint/RequireRelativeSelfPath:
Enabled: true
Lint/RescueException:
Enabled: true
Lint/ReturnInVoidContext:
Enabled: true
Lint/SafeNavigationChain:
Enabled: true
AllowedMethods:
- 'blank?'
- 'in?'
- 'presence'
- 'present?'
- 'try!'
- 'try'
Lint/SafeNavigationConsistency:
Enabled: true
Lint/SafeNavigationWithEmpty:
Enabled: true
Lint/ScriptPermission:
Enabled: true
Lint/SelfAssignment:
Enabled: true
Lint/SendWithMixinArgument:
Enabled: true
Lint/ShadowedArgument:
Enabled: true
IgnoreImplicitReferences: false
Lint/ShadowedException:
Enabled: true
Lint/ShadowingOuterLocalVariable:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Lint/SuppressedException:
Enabled: true
AllowComments: true
Lint/SymbolConversion:
Enabled: true
Lint/ToEnumArguments:
Enabled: true
Lint/ToJSON:
Enabled: true
Lint/TopLevelReturnWithArgument:
Enabled: true
Lint/TrailingCommaInAttributeDeclaration:
Enabled: true
Lint/TripleQuotes:
Enabled: true
Lint/UnderscorePrefixedVariableName:
Enabled: true
Lint/UnexpectedBlockArity:
Enabled: true
Methods:
chunk_while: 2
each_with_index: 2
each_with_object: 2
inject: 2
max: 2
min: 2
minmax: 2
reduce: 2
slice_when: 2
sort: 2
Lint/UnifiedInteger:
Enabled: true
Lint/UnmodifiedReduceAccumulator:
Enabled: true
Lint/UnreachableCode:
Enabled: true
Lint/UnreachableLoop:
Enabled: true
Lint/UnusedBlockArgument:
Enabled: true
AllowUnusedKeywordArguments: true
IgnoreEmptyBlocks: true
Lint/UnusedMethodArgument:
Enabled: true
AllowUnusedKeywordArguments: true
IgnoreEmptyMethods: true
IgnoreNotImplementedMethods: true
Lint/UriEscapeUnescape:
Enabled: true
Lint/UriRegexp:
Enabled: true
Lint/UselessAccessModifier:
Enabled: true
Lint/UselessAssignment:
Enabled: true
Lint/UselessElseWithoutRescue:
Enabled: true
Lint/UselessMethodDefinition:
Enabled: true
Lint/UselessRescue:
Enabled: true
Lint/UselessRuby2Keywords:
Enabled: true
Lint/UselessSetterCall:
Enabled: true
Lint/UselessTimes:
Enabled: true
Lint/Void:
Enabled: true
################################################################################
# METRICS
################################################################################
Metrics/AbcSize:
Enabled: true
CountRepeatedAttributes: false
Max: 17.0
AllowedMethods: []
Exclude:
- '/**/db/sample.rb'
Metrics/BlockNesting:
Enabled: true
CountBlocks: true
Max: 3
Exclude:
- '/**/*.rake'
- '/**/config/routes.rb'
- '/**/db/sample.rb'
- '/**/refinements/*.rb'
- '/**/spec/**/*_spec.rb'
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
- '/**/Rakefile'
Metrics/BlockLength:
CountComments: false
Max: 25
CountAsOne:
- 'array'
- 'hash'
- 'heredoc'
Exclude:
- '/**/*.rake'
- '/**/config/routes.rb'
- '/**/db/sample.rb'
- '/**/db/scrub.rb'
- '/**/db/seed.rb'
- '/**/refinements/*.rb'
- '/**/spec/**/*_spec.rb'
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
- '/**/spec/shared/**/*.rb'
- '/**/spec/support/**/*.rb'
- '/**/Rakefile'
AllowedMethods:
- 'namespace'
- 'draw'
- 'context'
- 'describe'
- 'refine'
- 'shared_examples'
- 'shared_examples_for'
Metrics/ClassLength:
Enabled: true
CountComments: false
Max: 200
CountAsOne:
- 'array'
- 'hash'
- 'heredoc'
Exclude:
- '/**/spec/**/*_spec.rb'
Metrics/ModuleLength:
Enabled: true
CountComments: false
Max: 200
CountAsOne:
- 'array'
- 'hash'
- 'heredoc'
Exclude:
- '/**/spec/**/*_spec.rb'
Metrics/CyclomaticComplexity:
Enabled: true
Max: 6
Metrics/MethodLength:
Enabled: true
CountComments: false
Max: 30
AllowedMethods: []
CountAsOne:
- 'array'
- 'hash'
- 'heredoc'
Exclude:
- '/**/db/sample.rb'
- '/**/db/scrub.rb'
- '/**/db/seed.rb'
Metrics/ParameterLists:
Enabled: true
Max: 5
CountKeywordArgs: true
MaxOptionalParameters: 3
Metrics/PerceivedComplexity:
Enabled: true
Max: 8
################################################################################
# MIGRATIONS
################################################################################
Migration/DepartmentName:
Enabled: true
################################################################################
# NAMING
################################################################################
Naming/AccessorMethodName:
Enabled: true
Naming/AsciiIdentifiers:
Enabled: true
AsciiConstants: true
Naming/BinaryOperatorParameterName:
Enabled: true
Naming/BlockForwarding:
Enabled: true
EnforcedStyle: 'explicit'
Naming/BlockParameterName:
Enabled: true
MinNameLength: 1
AllowNamesEndingInNumbers: true
AllowedNames: []
ForbiddenNames: []
Naming/ClassAndModuleCamelCase:
Enabled: true
AllowedNames: []
Naming/ConstantName:
Enabled: true
Naming/FileName:
Enabled: true
AllowedAcronyms: []
CheckDefinitionPathHierarchy: true
ExpectMatchingDefinition: false
IgnoreExecutableScripts: true
Exclude:
- '/**/Rakefile'
- '/**/Gemfile'
- '/**/Capfile'
- '/**/Vagrantfile'
- '/**/Podfile'
- '/**/Thorfile'
Naming/HeredocDelimiterNaming:
Enabled: true
ForbiddenDelimiters:
- 'END'
- !ruby/regexp '/EO[A-Z]{1}/'
Naming/HeredocDelimiterCase:
Enabled: true
EnforcedStyle: 'uppercase'
Naming/MemoizedInstanceVariableName:
Enabled: true
EnforcedStyleForLeadingUnderscores: 'disallowed'
Naming/InclusiveLanguage:
Enabled: false
Naming/MethodName:
Enabled: true
EnforcedStyle: 'snake_case'
AllowedPatterns: []
Naming/MethodParameterName:
Enabled: true
MinNameLength: 3
AllowNamesEndingInNumbers: true
AllowedNames:
- 'as'
- 'at'
- 'by'
- 'cc'
- 'db'
- 'id'
- 'if'
- 'in'
- 'io'
- 'ip'
- 'of'
- 'on'
- 'os'
- 'pp'
- 'to'
ForbiddenNames: []
Naming/PredicateName:
Enabled: true
AllowedMethods:
- 'is_a?'
ForbiddenPrefixes:
- 'is_'
- 'was_'
- 'have_'
MethodDefinitionMacros:
- 'define_method'
- 'define_singleton_method'
NamePrefix:
- 'is_'
- 'was_'
- 'has_'
- 'have_'
Exclude:
- '/**/spec/**/*.rb'
Naming/RescuedExceptionsVariableName:
Enabled: true
PreferredName: 'error'
Naming/VariableName:
Enabled: true
EnforcedStyle: 'snake_case'
AllowedIdentifiers: []
Naming/VariableNumber:
Enabled: true
EnforcedStyle: 'snake_case'
CheckMethodNames: true
CheckSymbols: false
AllowedIdentifiers:
- 'capture3' # Open3.capture3
- 'iso8601' # Time#iso8601
- 'rfc1123_date' # CGI.rfc1123_date
- 'rfc822' # Time#rfc822
- 'rfc2822' # Time#rfc2822
- 'rfc3339' # DateTime.rfc3339
- 'md5'
- 'sha1'
- 'sha224'
- 'sha256'
- 'sha384'
- 'sha512'
AllowedPatterns: []
################################################################################
# SECURITY
################################################################################
Security/CompoundHash:
Enabled: true
Security/Eval:
Enabled: true
Security/IoMethods:
Enabled: true
Security/JSONLoad:
Enabled: true
Exclude:
- '/**/spec/**/*.rb'
Security/Open:
Enabled: true
Exclude:
- '/**/spec/**/*_spec.rb'
Security/YAMLLoad:
Enabled: true
Exclude:
- '/**/spec/**/*.rb'
Security/MarshalLoad:
Enabled: true
Exclude:
- '/**/spec/**/*.rb'
################################################################################
# STYLE
################################################################################
Style/AccessModifierDeclarations:
Enabled: true
EnforcedStyle: 'group'
AllowModifiersOnSymbols: true
Style/AccessorGrouping:
Enabled: true
EnforcedStyle: 'grouped'
Style/Alias:
Enabled: true
EnforcedStyle: 'prefer_alias'
Style/AndOr:
Enabled: true
EnforcedStyle: 'always'
Style/ArgumentsForwarding:
Enabled: true
AllowOnlyRestArgument: true
Style/ArrayCoercion:
Enabled: true
Style/ArrayJoin:
Enabled: true
Style/ArrayIntersect:
Enabled: true
Style/AsciiComments:
Enabled: true
AllowedChars:
- ©
Style/Attr:
Enabled: true
Style/AutoResourceCleanup:
Enabled: true
Style/BarePercentLiterals:
Enabled: true
EnforcedStyle: 'percent_q'
Style/BeginBlock:
Enabled: true
Style/BisectedAttrAccessor:
Enabled: true
Style/BlockComments:
Enabled: true
Style/BlockDelimiters:
Enabled: true
EnforcedStyle: 'braces_for_chaining'
AllowBracesOnProceduralOneLiners: true
Exclude:
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
- '/**/app/controllers/**/*.rb'
Style/CaseEquality:
Enabled: true
AllowOnConstant: true
AllowOnSelfClass: true
Style/CaseLikeIf:
Enabled: true
Style/CharacterLiteral:
Enabled: true
Style/ClassAndModuleChildren:
Enabled: true
EnforcedStyle: 'nested'
Style/ClassCheck:
Enabled: true
EnforcedStyle: 'is_a?'
Style/ClassEqualityComparison:
Enabled: true
AllowedMethods:
- '=='
- 'equal?'
- 'eql?'
Style/ClassMethods:
Enabled: true
Style/ClassMethodsDefinitions:
Enabled: true
EnforcedStyle: 'def_self'
Style/ClassVars:
Enabled: true
Style/CollectionCompact:
Enabled: true
Style/CollectionMethods:
Enabled: true
PreferredMethods:
collect!: 'map!'
collect: 'map'
detect: 'find'
find_all: 'select'
member?: 'include?'
reduce: 'inject'
Style/ColonMethodCall:
Enabled: true
Style/ColonMethodDefinition:
Enabled: true
Style/CombinableLoops:
Enabled: true
Style/CommandLiteral:
Enabled: true
EnforcedStyle: 'backticks'
AllowInnerBackticks: false
Style/CommentAnnotation:
Enabled: true
Keywords:
- 'FIXME'
- 'HACK'
- 'NOTE'
- 'OPTIMIZE'
- 'REVIEW'
- 'TODO'
Style/CommentedKeyword:
Enabled: true
Exclude:
- '/**/Gemfile'
Style/ComparableClamp:
Enabled: true
Style/ConcatArrayLiterals:
Enabled: true
Style/ConditionalAssignment:
Enabled: true
EnforcedStyle: 'assign_to_condition'
IncludeTernaryExpressions: true
SingleLineConditionsOnly: false
Style/ConstantVisibility:
# This seems broken
Enabled: false
IgnoreModules: true
Style/Copyright:
# Copyrights at the Top of Files are Noisy
Enabled: false
Style/DefWithParentheses:
Enabled: true
Style/Dir:
Enabled: true
Style/DisableCopsWithinSourceCodeDirective:
Enabled: false
AllowedCops: []
Style/Documentation:
# Use Some Other Tool Like `inch` to Enforce This
Enabled: false
Style/DocumentationMethod:
RequireForNonPublicMethods: false
Style/DocumentDynamicEvalDefinition:
Enabled: true
Style/DoubleNegation:
Enabled: true
EnforcedStyle: 'allowed_in_returns'
Style/EachForSimpleLoop:
Enabled: true
Style/EachWithObject:
Enabled: true
Lint/EmptyBlock:
Enabled: true
AllowComments: false
Exclude:
- '/**/config/environments/*.rb'
- '/**/config/initializers/*.rb'
- '/**/db/scrub.rb'
- '/**/db/seed.rb'
- '/**/spec/**/*_spec.rb'
- '/**/spec/shared/**/*.rb'
Style/EmptyBlockParameter:
Enabled: true
Style/EmptyCaseCondition:
Enabled: true
Style/EmptyElse:
Enabled: true
EnforcedStyle: 'both'
AllowComments: false
Style/EmptyHeredoc:
Enabled: true
Style/EmptyLiteral:
Enabled: true
Exclude:
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
Style/EmptyMethod:
Enabled: true
EnforcedStyle: 'compact'
Style/Encoding:
Enabled: true
Style/EndBlock:
Enabled: true
Style/EndlessMethod:
Enabled: true
EnforcedStyle: 'disallow'
Style/EnvHome:
Enabled: true
Style/ExpandPathArguments:
Enabled: true
Style/ExplicitBlockArgument:
Enabled: true
Style/ExponentialNotation:
Enabled: true
EnforcedStyle: 'scientific'
Style/EvalWithLocation:
Enabled: true
Style/EvenOdd:
Enabled: true
Style/FetchEnvVar:
Enabled: true
AllowedVars: []
Style/FileRead:
Enabled: true
Style/FileWrite:
Enabled: true
Style/FloatDivision:
Enabled: true
EnforcedStyle: 'right_coerce'
Style/For:
Enabled: true
EnforcedStyle: 'each'
Style/FormatString:
Enabled: true
EnforcedStyle: 'percent'
Style/FormatStringToken:
Enabled: true
EnforcedStyle: 'annotated'
MaxUnannotatedPlaceholdersAllowed: 1
AllowedMethods: []
Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: 'always_true'
Style/GlobalStdStream:
Enabled: true
Style/GlobalVars:
Enabled: true
AllowedVariables: []
Style/GuardClause:
Enabled: true
MinBodyLength: 1
AllowConsecutiveConditionals: false
Style/HashAsLastArrayItem:
Enabled: true
EnforcedStyle: 'braces'
Style/HashConversion:
Enabled: true
AllowSplatArgument: true
Exclude:
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
Style/HashEachMethods:
Enabled: true
AllowedReceivers: []
Style/HashExcept:
Enabled: true
Style/HashLikeCase:
Enabled: true
MinBranchesCount: 1
Style/HashSyntax:
Enabled: true
EnforcedStyle: 'ruby19'
EnforcedShorthandSyntax: 'never'
UseHashRocketsWithSymbolValues: false
PreferHashRocketsForNonAlnumEndingSymbols: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/IdenticalConditionalBranches:
Enabled: true
Style/IfInsideElse:
Enabled: true
AllowIfModifier: false
Style/IfUnlessModifier:
# Disabled Until https://github.com/rubocop-hq/rubocop/issues/3534 Is Addressed
Enabled: false
Exclude:
- '/**/config/initializers/*.rb'
Style/IfUnlessModifierOfIfUnless:
Enabled: true
Style/IfWithBooleanLiteralBranches:
Enabled: true
AllowedMethods:
- 'nonzero?'
Style/IfWithSemicolon:
Enabled: true
Style/ImplicitRuntimeError:
Enabled: true
Style/InfiniteLoop:
Enabled: true
Style/InlineComment:
Enabled: true
Exclude:
- '/**/Gemfile'
- '/**/config/boot.rb'
- '/**/config/initializers/*.rb'
Style/InPatternThen:
Enabled: true
Style/InverseMethods:
Enabled: true
InverseMethods:
:any?: :none?
:even?: :odd?
:==: :!=
:=~: :!~
:<: :>=
:>: :<=
:present?: :blank?,
:include?: :exclude?
InverseBlocks:
:select: :reject
:select!: :reject!
Style/InvertibleUnlessCondition:
Enabled: true
InverseMethods:
:!=: :==
:>: :<=
:<=: :>
:<: :>=
:>=: :<
:!~: :=~
:zero?: :nonzero?
:nonzero?: :zero?
:any?: :none?
:none?: :any?
:even?: :odd?
:odd?: :even?
Style/IpAddresses:
Enabled: true
AllowedAddresses:
- '::'
- '127.0.0.1'
- '0.0.0.0'
Exclude:
- '/**/*.gemspec'
- '/**/Gemfile'
- '/**/Gemfile.lock'
- '/**/spec/**/*_spec.rb'
- '/**/spec/**/factories/**/*.rb'
- '/**/spec/factories.rb'
Style/KeywordParametersOrder:
Enabled: true
Style/Lambda:
Enabled: true
Style/LambdaCall:
Enabled: true
EnforcedStyle: 'call'
Style/LineEndConcatenation:
Enabled: true
Style/MagicCommentFormat:
Enabled: true
EnforcedStyle: "snake_case"
DirectiveCapitalization: "lowercase"
ValueCapitalization: ~
Style/MapCompactWithConditionalBlock:
Enabled: true
Style/MapToHash:
Enabled: true
Style/MapToSet:
Enabled: true
Style/MethodCalledOnDoEndBlock:
Enabled: true
Style/MethodCallWithArgsParentheses:
# Would Require a *lot* of Effort Adding Allowed Methods
Enabled: false
AllowParenthesesInCamelCaseMethod: true
AllowParenthesesInChaining: true
AllowParenthesesInMultilineCall: true
AllowParenthesesInStringInterpolation: true
IgnoreMacros: true
AllowedMethods:
- 'puts'
AllowedPatterns: []
IncludedMacros: []
Style/MethodCallWithoutArgsParentheses:
Enabled: true
AllowedMethods: []
Style/MethodDefParentheses:
Enabled: true
EnforcedStyle: 'require_parentheses'
Style/MinMax:
Enabled: true
Style/MinMaxComparison:
Enabled: true
Style/MissingElse:
# Decent Idea But Too Many Use Cases for `if` Without `else`
Enabled: false
EnforcedStyle: 'both'
SupportedStyles:
- 'if'
- 'case'
- 'both'
Style/MissingRespondToMissing:
Enabled: true
Style/MixinGrouping:
Enabled: true
EnforcedStyle: 'separated'
Exclude:
- '/**/spec/**/*_spec.rb'
Style/MixinUsage:
Enabled: true
Style/ModuleFunction:
Enabled: true
EnforcedStyle: 'module_function'
Style/MultilineBlockChain:
Enabled: true
Exclude:
- '/**/spec/**/*_spec.rb'
Style/MultilineIfModifier:
Enabled: true
Style/MultilineIfThen:
Enabled: true
Style/MultilineInPatternThen:
Enabled: true
Style/MultilineMemoization:
Enabled: true
EnforcedStyle: 'keyword'
Style/MultilineMethodSignature:
# Disallows: my_method(foo,
# bar)
Enabled: false
Style/MultilineTernaryOperator:
Enabled: true
Style/MultilineWhenThen:
Enabled: true
Style/MultipleComparison:
Enabled: true
Style/MutableConstant:
Enabled: true
Style/NegatedIf:
Enabled: true
EnforcedStyle: 'both'
Style/NegatedIfElseCondition:
Enabled: true
Style/NegatedUnless:
Enabled: true
EnforcedStyle: 'both'
Style/NegatedWhile:
Enabled: true
Style/NestedFileDirname:
Enabled: true
Style/NestedModifier:
Enabled: true
Style/NestedParenthesizedCalls:
Enabled: true
AllowedMethods:
- 'be'
- 'be_a'
- 'be_an'
- 'be_between'
- 'be_falsey'
- 'be_kind_of'
- 'be_instance_of'
- 'be_truthy'
- 'be_within'
- 'eq'
- 'eql'
- 'end_with'
- 'include'
- 'match'
- 'raise_error'
- 'respond_to'
- 'start_with'
Style/NestedTernaryOperator:
Enabled: true
Style/Next:
Enabled: true
EnforcedStyle: 'skip_modifier_ifs'
MinBodyLength: 3
Style/NilComparison:
Enabled: true
EnforcedStyle: 'predicate'
Style/NilLambda:
Enabled: true
Style/NonNilCheck:
Enabled: true
IncludeSemanticChanges: false
Style/Not:
Enabled: true
Style/NumberedParameters:
Enabled: true
EnforcedStyle: 'allow_single_line'
Style/NumberedParametersLimit:
Enabled: true
Max: 1
Style/NumericLiteralPrefix:
Enabled: true
EnforcedOctalStyle: 'zero_with_o'
Style/NumericLiterals:
Enabled: true
MinDigits: 5
AllowedNumbers: []
Strict: false
Style/NumericPredicate:
Enabled: true
EnforcedStyle: 'comparison'
AllowedMethods: []
Style/ObjectThen:
Enabled: true
EnforcedStyle: 'then'
Style/OneLineConditional:
Enabled: true
Style/OpenStructUse:
Enabled: true
Style/OperatorMethodCall:
Enabled: true
Style/OptionalArguments:
Enabled: true
Style/OptionalBooleanParameter:
Enabled: true
AllowedMethods:
- 'respond_to_missing?'
Style/OptionHash:
Enabled: true
Exclude:
- '/**/workers/**/*.rb'
- '/**/jobs/**/*.rb'
SuspiciousParamNames:
- 'options'
- 'opts'
- 'args'
- 'params'
- 'parameters'
Style/OrAssignment:
Enabled: true
Style/ParallelAssignment:
Enabled: true
Style/ParenthesesAroundCondition:
Enabled: true
AllowSafeAssignment: true
AllowInMultilineConditions: false
Style/PercentLiteralDelimiters:
Enabled: true
PreferredDelimiters:
'%': '{}'
'%i': '{}'
'%I': '{}'
'%q': '{}'
'%Q': '{}'
'%r': '{}'
'%s': '{}'
'%w': '{}'
'%W': '{}'
'%x': '{}'
Style/PercentQLiterals:
Enabled: true
EnforcedStyle: 'upper_case_q'
Style/PerlBackrefs:
Enabled: true
Style/PreferredHashMethods:
Enabled: true
EnforcedStyle: 'verbose'
Style/Proc:
Enabled: true
Style/QuotedSymbols:
Enabled: true
EnforcedStyle: 'same_as_string_literals'
Style/RaiseArgs:
Enabled: true
EnforcedStyle: 'exploded'
AllowedCompactTypes: []
Style/RandomWithOffset:
Enabled: true
Style/RedundantArgument:
Enabled: true
Methods:
join: ''
split: ' '
Style/RedundantAssignment:
Enabled: true
Style/RedundantBegin:
Enabled: true
Style/RedundantCapitalW:
Enabled: true
Style/RedundantCondition:
Enabled: true
Style/RedundantConditional:
Enabled: true
Style/RedundantConstantBase:
Enabled: true
Style/RedundantDoubleSplatHashBraces:
Enabled: true
Style/RedundantEach:
Enabled: true
Style/RedundantException:
Enabled: true
Style/RedundantFetchBlock:
Enabled: true
Style/RedundantFileExtensionInRequire:
Enabled: true
Style/RedundantFreeze:
Enabled: true
Style/RedundantHeredocDelimiterQuotes:
Enabled: true
Style/RedundantInitialize:
Enabled: true
AllowComments: false
Style/RedundantInterpolation:
Enabled: true
Style/RedundantParentheses:
Enabled: true
Style/RedundantPercentQ:
Enabled: true
Style/RedundantRegexpCharacterClass:
Enabled: true
Style/RedundantRegexpEscape:
Enabled: true
Style/RedundantReturn:
Enabled: true
AllowMultipleReturnValues: true
Style/RedundantSelf:
Enabled: true
Style/RedundantSelfAssignment:
Enabled: true
Style/RedundantSelfAssignmentBranch:
Enabled: true
Style/RedundantSortBy:
Enabled: true
Style/RedundantStringEscape:
Enabled: true
Style/RegexpLiteral:
Enabled: true
EnforcedStyle: 'slashes'
AllowInnerSlashes: false
Style/RequireOrder:
Enabled: false
Style/RescueModifier:
Enabled: true
Style/RescueStandardError:
Enabled: true
Style/ReturnNil:
Enabled: true
EnforcedStyle: 'return'
Style/SafeNavigation:
Enabled: true
ConvertCodeThatCanStartToReturnNil: false
MaxChainLength: 1
AllowedMethods:
- 'blank?'
- 'presence'
- 'present?'
- 'try!'
- 'try'
Style/Sample:
Enabled: true
Style/SelectByRegexp:
Enabled: true
Style/SelfAssignment:
Enabled: true
Style/Semicolon:
Enabled: true
AllowAsExpressionSeparator: false
Style/Send:
Enabled: true
Exclude:
- '/**/spec/**/*_spec.rb'
Style/SignalException:
Enabled: true
EnforcedStyle: 'semantic'
Style/SingleArgumentDig:
Enabled: true
Style/SingleLineBlockParams:
Enabled: true
Methods:
- reduce:
- 'm'
- 'v'
- inject:
- 'm'
- 'v'
Style/SingleLineMethods:
Enabled: true
AllowIfMethodIsEmpty: true
Exclude:
- '/**/app/models/**/*.rb'
Style/SlicingWithRange:
Enabled: true
Style/SoleNestedConditional:
Enabled: true
Style/SpecialGlobalVars:
Enabled: true
EnforcedStyle: 'use_english_names'
RequireEnglish: true
Style/StabbyLambdaParentheses:
Enabled: true
EnforcedStyle: 'require_parentheses'
# Requires too many exceptions (eg subclasses that inherit from a static class,
# etc)
Style/StaticClass:
Enabled: false
Style/StderrPuts:
Enabled: true
Style/StringChars:
Enabled: true
Style/StringConcatenation:
Enabled: true
Style/StringHashKeys:
Enabled: false # Requires Symbolized Hash Keys
Style/StringLiterals:
Enabled: true
EnforcedStyle: 'single_quotes'
ConsistentQuotesInMultiline: true
Style/StringLiteralsInInterpolation:
Enabled: true
Style/StringMethods:
Enabled: true
PreferredMethods:
intern: 'to_sym'
Style/Strip:
Enabled: true
Style/StructInheritance:
Enabled: true
Style/SwapValues:
Enabled: true
Style/SymbolArray:
Enabled: true
EnforcedStyle: 'percent'
MinSize: 0
Style/SymbolLiteral:
Enabled: true
Style/SymbolProc:
Enabled: true
AllowMethodsWithArguments: false
AllowComments: false
AllowedMethods:
- 'define_method'
Style/TernaryParentheses:
Enabled: true
AllowSafeAssignment: true
EnforcedStyle: 'require_parentheses_when_complex'
Style/TopLevelMethodDefinition:
Enabled: true
Exclude:
- '/**/spec/support/**/*.rb'
Style/TrailingBodyOnClass:
Enabled: true
Style/TrailingBodyOnMethodDefinition:
Enabled: true
Style/TrailingBodyOnModule:
Enabled: true
Style/TrailingCommaInArguments:
Enabled: true
EnforcedStyleForMultiline: 'comma'
Style/TrailingCommaInArrayLiteral:
Enabled: true
EnforcedStyleForMultiline: 'comma'
Style/TrailingCommaInBlockArgs:
Enabled: true
Style/TrailingCommaInHashLiteral:
Enabled: true
EnforcedStyleForMultiline: 'comma'
Style/TrailingMethodEndStatement:
Enabled: true
Style/TrailingUnderscoreVariable:
Enabled: true
AllowNamedUnderscoreVariables: true
Style/TrivialAccessors:
Enabled: true
AllowPredicates: false
Style/UnlessElse:
Enabled: true
Style/UnlessLogicalOperators:
Enabled: true
EnforcedStyle: 'forbid_mixed_logical_operators'
Style/UnpackFirst:
Enabled: true
Style/VariableInterpolation:
Enabled: true
Style/WhenThen:
Enabled: true
Style/WhileUntilDo:
Enabled: true
Style/WhileUntilModifier:
Enabled: true
Style/WordArray:
Enabled: true
EnforcedStyle: 'percent'
MinSize: 0
Style/YodaCondition:
Enabled: true
EnforcedStyle: 'forbid_for_all_comparison_operators'
Style/YodaExpression:
Enabled: false
SupportedOperators:
- '*'
- '+'
- '&'
- '|'
- '^'
Style/ZeroLengthPredicate:
Enabled: true