hummingbird-me/kitsu-server

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
require:
  - rubocop-rails
  - rubocop-rspec
  - rubocop-performance
AllCops:
  NewCops: enable
  Exclude:
    - db/**/*
    - bin/**/*
    - Guardfile
  DisplayCopNames: false
  DisplayStyleGuide: true
  StyleGuideCopsOnly: false
  TargetRubyVersion: 3.1
Layout/ArgumentAlignment:
  EnforcedStyle: with_fixed_indentation
Style/BlockDelimiters:
  EnforcedStyle: braces_for_chaining
Style/CollectionMethods:
  PreferredMethods:
    collect: map
    collect!: map!
    inject: reduce
    detect: find
    find_all: select
Style/CommentAnnotation:
  Enabled: true
  Keywords:
    - TODO
    - FIXME
    - OPTIMIZE
    - HACK
    - REVIEW
    - DEPRECATED
Layout/DotPosition:
  EnforcedStyle: leading
Layout/EmptyLineAfterGuardClause:
  Enabled: false
Naming/FileName:
  Enabled: true
  Exclude: ['**/jsonapi-resources.rb']
Style/FormatString:
  Enabled: true
  EnforcedStyle: format
Style/FrozenStringLiteralComment:
  SafeAutoCorrect: true
  Enabled: true
Style/GlobalVars:
  Enabled: false
Style/GuardClause:
  Enabled: true
  MinBodyLength: 3
Style/IfUnlessModifier:
  Enabled: true
Layout/FirstArrayElementIndentation:
  EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
  EnforcedStyle: consistent
Style/LambdaCall:
  Enabled: true
Style/Next:
  Enabled: true
  MinBodyLength: 3
Style/NumericLiterals:
  Enabled: true
  MinDigits: 5
Style/PercentLiteralDelimiters:
  Enabled: true
  PreferredDelimiters:
    '%': '[]'
    '%i': '[]'
    '%q': '[]'
    '%Q': '[]'
    '%r': '{}'
    '%s': '()'
    '%w': '[]'
    '%W': '[]'
    '%x': '[]'
Naming/PredicateName:
  Enabled: true
  NamePrefix:
    - is_
    - has_
    - have_
  ForbiddenPrefixes:
    - is_
  Exclude:
    - app/graphql/types/**/*
Style/RaiseArgs:
  Enabled: true
  EnforcedStyle: exploded
Style/SingleLineMethods:
  Enabled: true
  AllowIfMethodIsEmpty: true
Style/StringLiterals:
  EnforcedStyle: single_quotes
Layout/SpaceAroundEqualsInParameterDefault:
  Enabled: true
  EnforcedStyle: space
Layout/SpaceBeforeBlockBraces:
  Enabled: true
  EnforcedStyle: space
Layout/SpaceInsideBlockBraces:
  Enabled: true
  EnforcedStyle: space
  EnforcedStyleForEmptyBraces: no_space
  SpaceBeforeBlockParameters: true
Layout/SpaceInsideHashLiteralBraces:
  Enabled: true
  EnforcedStyle: space
  EnforcedStyleForEmptyBraces: no_space
Style/SymbolProc:
  Enabled: true
Layout/TrailingEmptyLines:
  Enabled: true
  EnforcedStyle: final_newline
Style/TrailingCommaInArguments:
  Enabled: true
  EnforcedStyleForMultiline: no_comma
Style/TrailingCommaInArrayLiteral:
  Enabled: true
  EnforcedStyleForMultiline: no_comma
Style/TrailingCommaInHashLiteral:
  Enabled: true
  EnforcedStyleForMultiline: no_comma
Style/TrivialAccessors:
  Enabled: true
  AllowDSLWriters: true
Naming/VariableName:
  Enabled: true
  EnforcedStyle: snake_case
Style/WordArray:
  Enabled: true
  MinSize: 2
Metrics/AbcSize:
  Enabled: false
Metrics/BlockNesting:
  Enabled: true
  Max: 5
Metrics/BlockLength:
  Enabled: false
Metrics/ClassLength:
  Enabled: true
  CountComments: false
  Max: 500
Metrics/ModuleLength:
  Enabled: true
  CountComments: false
  Max: 500
Metrics/CyclomaticComplexity:
  Enabled: false
Layout/LineLength:
  Enabled: true
  Max: 100
  AllowURI: true
  IgnoreCopDirectives: true
  Exclude:
    - config/routes.rb
Metrics/MethodLength:
  Enabled: true
  CountComments: false
  Max: 100
Metrics/ParameterLists:
  Enabled: true
  Max: 5
  CountKeywordArgs: false
Metrics/PerceivedComplexity:
  Enabled: false
Lint/AssignmentInCondition:
  Enabled: true
  AllowSafeAssignment: true
Style/InlineComment:
  Enabled: false
Style/MethodCalledOnDoEndBlock:
  Enabled: true
Style/SymbolArray:
  Enabled: true
Naming/AccessorMethodName:
  Enabled: true
Style/Alias:
  Enabled: true
  EnforcedStyle: prefer_alias_method
Style/ArrayJoin:
  Enabled: true
Style/AsciiComments:
  Enabled: false
Naming/AsciiIdentifiers:
  Enabled: true
Style/Attr:
  Enabled: true
Style/BlockComments:
  Enabled: true
Style/ColonMethodCall:
  Enabled: true
Style/Documentation:
  Enabled: false
Style/EmptyLiteral:
  Enabled: true
Style/EvenOdd:
  Enabled: true
Lint/FlipFlop:
  Enabled: true
Style/IfWithSemicolon:
  Enabled: true
Style/Lambda:
  EnforcedStyle: literal
  # HACK: Until Rubocop is released with EnforcedStyle
  Enabled: true
Layout/LeadingCommentSpace:
  Enabled: true
Style/MultilineBlockChain:
  Enabled: true
Style/MultilineTernaryOperator:
  Enabled: true
Style/NegatedIf:
  Enabled: true
Style/NestedTernaryOperator:
  Enabled: true
Style/NilComparison:
  Enabled: true
Style/Not:
  Enabled: true
Style/OneLineConditional:
  Enabled: true
Style/PerlBackrefs:
  Enabled: true
Style/RedundantBegin:
  Enabled: true
Style/RedundantSelf:
  Enabled: true
Style/RescueModifier:
  Enabled: true
Style/SelfAssignment:
  Enabled: true
Style/ClassAndModuleChildren:
  Enabled: true
  Exclude:
    - app/graphql/**/*
Style/HashEachMethods:
  Enabled: true
Style/HashTransformKeys:
  Enabled: true
Style/HashTransformValues:
  Enabled: true
Layout/EndAlignment:
  EnforcedStyleAlignWith: variable
  Enabled: true
Layout/SpaceBeforeFirstArg:
  Enabled: true
Layout/SpaceAfterColon:
  Enabled: true
Layout/SpaceAfterComma:
  Enabled: true
Layout/SpaceAroundKeyword:
  Enabled: true
Layout/SpaceAfterMethodName:
  Enabled: true
Layout/SpaceAfterNot:
  Enabled: true
Layout/SpaceAfterSemicolon:
  Enabled: true
Layout/SpaceBeforeComma:
  Enabled: true
Layout/SpaceBeforeComment:
  Enabled: true
Layout/SpaceBeforeSemicolon:
  Enabled: true
Layout/SpaceAroundOperators:
  Enabled: true
Layout/SpaceInsideParens:
  Enabled: true
Layout/SpaceInsideRangeLiteral:
  Enabled: true
Style/SpecialGlobalVars:
  Enabled: true
Layout/TrailingWhitespace:
  Enabled: true
Style/UnlessElse:
  Enabled: true
Style/VariableInterpolation:
  Enabled: true
Style/WhenThen:
  Enabled: true
Lint/Debugger:
  Enabled: true
Lint/DeprecatedClassMethods:
  Enabled: true
Security/Eval:
  Enabled: true
Lint/SuppressedException:
  Enabled: true
Lint/LiteralInInterpolation:
  Enabled: true
Lint/Loop:
  Enabled: true
Lint/ParenthesesAsGroupedExpression:
  Enabled: true
Lint/RequireParentheses:
  Enabled: false
Lint/UnderscorePrefixedVariableName:
  Enabled: true
Lint/UselessSetterCall:
  Enabled: true
Rails/HasAndBelongsToMany:
  Enabled: false
Rails/TimeZone:
  Enabled: false
RSpec/ExampleLength:
  Max: 20
RSpec/ImplicitSubject:
  EnforcedStyle: single_statement_only
  Enabled: true
RSpec/Focus:
  AutoCorrect: false
Rails/UnknownEnv:
  Environments:
    - production
    - staging
    - development
    - test