eBooru/.rubocop.yml
Earlopain f00e781b3b
[CI] Run rubocop and add rubocop-todo
There's no point in building the Dockerfile just for rubocop, but
doing it this way allows for easy integration of a test action in the future.
2023-02-22 21:59:43 +01:00

147 lines
2.2 KiB
YAML

<% if ENV["CI"] %>
inherit_from: .rubocop_todo.yml
inherit_mode:
merge:
- Exclude
<% end %>
require:
- rubocop-rails
AllCops:
NewCops: enable
Exclude:
- bin/*
- node_modules/**/*
Bundler/OrderedGems:
Enabled: false
Layout/EmptyLineAfterGuardClause:
Enabled: false
Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Layout/LineLength:
Enabled: false
Lint/SymbolConversion:
EnforcedStyle: consistent
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
AllowedMethods:
- class_methods
- concerning
- context
- create_table
- factory
- FactoryBot.define
- should
Exclude:
- config/routes.rb
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Naming/PredicateName:
Enabled: false
Rails/BulkChangeTable:
Enabled: false
Rails/HasManyOrHasOneDependent:
Enabled: false
Rails/HttpStatus:
EnforcedStyle: numeric
Rails/I18nLocaleTexts:
Enabled: false
Rails/InverseOf:
Enabled: false
Rails/Output:
Exclude:
- db/seeds.rb
- db/fixes/*.rb
Rails/ReversibleMigration:
Enabled: false
Rails/SkipsModelValidations:
Enabled: false
Rails/TimeZone:
Enabled: false
Rails/WhereEquals:
Enabled: false
Rails/WhereExists:
EnforcedStyle: where
Style/ConditionalAssignment:
Enabled: false
Style/Documentation:
Enabled: false
Style/EmptyMethod:
EnforcedStyle: expanded
Style/FloatDivision:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/GuardClause:
Enabled: false
Style/HashSyntax:
EnforcedShorthandSyntax: never
Style/IfUnlessModifier:
Enabled: false
Style/NumericPredicate:
EnforcedStyle: comparison
Style/PerlBackrefs:
Enabled: false
Style/QuotedSymbols:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma