inherit_from: - .rubocop-performance.yml - new_cops.yml AllCops: TargetRubyVersion: 2.6 Exclude: - db/migrate/* - db/seeds/* - db/schema.rb - db/seeds.rb - script/**/* - bin/**/* - vendor/**/* - test/**/* - features/**/* - Gemfile - Gemfile.lock - node_modules/**/* - app/channels/application_cable/* - config/environments/development.rb - config/spring.rb - config/application.rb DisplayCopNames: true DisplayStyleGuide: true Layout/HashAlignment: EnforcedHashRocketStyle: key # key - left alignment of keys # 'a' => 2 # 'bb' => 3 EnforcedColonStyle: key # key - left alignment of keys # a: 0 # bb: 1 EnforcedLastArgumentHashStyle: ignore_implicit # ignore_implicit - Ignore only implicit hashes. # Accepts: # function(a: 1, # b: 2) # Registers an offense for: # function({a: 1, # b: 2}) Layout/ParameterAlignment: EnforcedStyle: with_fixed_indentation # The `with_fixed_indentation` style aligns the following lines with one # level of indentation relative to the start of the line with the method call. # # method_call(a, # b) Style/AndOr: EnforcedStyle: conditionals # `and` and `or` are banned only in conditionals (conditionals) Style/BlockDelimiters: EnforcedStyle: line_count_based # The `line_count_based` style enforces braces around single line blocks and # do..end around multi-line blocks. Exclude: - spec/**/* Style/ClassAndModuleChildren: EnforcedStyle: compact Style/IdenticalConditionalBranches: Enabled: false # Redirect_to usage in conditionals Style/FrozenStringLiteralComment: # Ensure default is followed Enabled: true Style/ExpandPathArguments: Enabled: false Style/NumericPredicate: Enabled: false # Use .positive? instead of > 0 # Use .zero? instead of == 0 # Use .nonzero? instead of != 0. Style/GlobalVars: Enabled: true AllowedVariables: [$ASSET_MODE] # Do not introduce global variables. (used for cucumber custom_env) Style/EachWithObject: Enabled: false Style/UnpackFirst: Enabled: false Layout/EmptyLinesAroundAttributeAccessor: Enabled: true Layout/SpaceAroundMethodCallOperator: Enabled: true Layout/EndAlignment: EnforcedStyleAlignWith: variable Layout/HeredocArgumentClosingParenthesis: Enabled: true Layout/FirstParameterIndentation: Enabled: true EnforcedStyle: consistent Layout/LineLength: Max: 120 Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Layout/MultilineOperationIndentation: EnforcedStyle: indented Style/TrivialAccessors: Enabled: true Metrics/AbcSize: Enabled: false Metrics/BlockLength: CountComments: false # count full line comments? Max: 50 Exclude: - spec/**/**.rb - config/routes.rb Metrics/ClassLength: Enabled: false Metrics/MethodLength: Max: 30 Severity: warning Metrics/ModuleLength: Enabled: false Style/Documentation: Enabled: false Bundler/OrderedGems: TreatCommentsAsGroupSeparators: true Style/EmptyMethod: Enabled: false Style/FloatDivision: Enabled: true EnforcedStyle: single_coerce Style/IpAddresses: Enabled: true Style/ModuleFunction: Enabled: false Style/MultilineMethodSignature: Enabled: true Style/MultilineWhenThen: Enabled: true Style/NegatedUnless: Enabled: true EnforcedStyle: both Style/StringLiterals: Enabled: false Style/ArrayCoercion: Enabled: true Style/CaseLikeIf: Enabled: true Style/HashAsLastArrayItem: Enabled: true Style/HashLikeCase: Enabled: true Style/HashTransformKeys: Enabled: true Style/HashTransformValues: Enabled: true Style/RedundantAssignment: Enabled: true Style/RedundantFetchBlock: Enabled: true Style/RedundantFileExtensionInRequire: Enabled: true Style/RedundantRegexpCharacterClass: Enabled: true Style/RedundantRegexpEscape: Enabled: true Style/SlicingWithRange: Enabled: true Style/HashEachMethods: Enabled: true Style/ExponentialNotation: Enabled: true Style/BisectedAttrAccessor: Enabled: true Style/AccessorGrouping: Enabled: true Style/StringLiteralsInInterpolation: Enabled: false Style/ExplicitBlockArgument: Enabled: false Style/GlobalStdStream: Enabled: false Style/OptionalBooleanParameter: Enabled: false Style/SingleArgumentDig: Enabled: false Style/StringConcatenation: Enabled: false Lint/DisjunctiveAssignmentInConstructor: Enabled: true Lint/HeredocMethodCallPosition: Enabled: true Lint/SafeNavigationWithEmpty: Enabled: true Lint/SendWithMixinArgument: Enabled: true Lint/ToJSON: Enabled: true Gemspec/RubyVersionGlobalsUsage: Enabled: true Gemspec/RequiredRubyVersion: Enabled: false Lint/NonDeterministicRequireOrder: Enabled: false Lint/RaiseException: Enabled: true Lint/MixedRegexpCaptureTypes: Enabled: true Lint/DeprecatedOpenSSLConstant: Enabled: true Lint/StructNewOverride: Enabled: true Lint/DuplicateElsifCondition: Enabled: true Lint/BinaryOperatorWithIdenticalOperands: Enabled: false Lint/DuplicateRescueException: Enabled: false Lint/EmptyConditionalBody: Enabled: false Lint/FloatComparison: Enabled: false Lint/MissingSuper: Enabled: false Lint/OutOfRangeRegexpRef: Enabled: false Lint/SelfAssignment: Enabled: false Lint/TopLevelReturnWithArgument: Enabled: false Lint/UnreachableLoop: Enabled: false