mirror of
https://github.com/redmine/redmine.git
synced 2024-08-17 14:11:13 +02:00
![Go MAEDA](/assets/img/avatar_default.png)
git-svn-id: https://svn.redmine.org/redmine/trunk@21931 e93f8b46-1217-0410-a6f0-8f06a7374b81
253 lines
4.7 KiB
YAML
253 lines
4.7 KiB
YAML
inherit_from: .rubocop_todo.yml
|
|
|
|
AllCops:
|
|
TargetRubyVersion: 2.6
|
|
TargetRailsVersion: 6.1
|
|
|
|
NewCops: enable
|
|
|
|
Exclude:
|
|
- '**/vendor/**/*'
|
|
- '**/tmp/**/*'
|
|
- '**/bin/**/*'
|
|
- '**/plugins/**/*'
|
|
- '**/extra/**/*'
|
|
- '**/lib/generators/**/templates/*'
|
|
- '**/lib/tasks/**/*'
|
|
- '**/files/**/*'
|
|
- 'db/schema.rb'
|
|
|
|
# Enable extensions
|
|
|
|
require:
|
|
- rubocop-performance
|
|
- rubocop-rails
|
|
|
|
# Rules for Redmine
|
|
|
|
Bundler/OrderedGems:
|
|
Enabled: false
|
|
|
|
Layout/CaseIndentation:
|
|
Exclude:
|
|
- 'config/initializers/10-patches.rb'
|
|
|
|
Layout/ClosingParenthesisIndentation:
|
|
Enabled: true
|
|
Exclude:
|
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
|
|
|
Layout/EmptyLinesAroundAccessModifier:
|
|
Enabled: true
|
|
Exclude:
|
|
- 'config/initializers/10-patches.rb'
|
|
|
|
Layout/EmptyLineBetweenDefs:
|
|
AllowAdjacentOneLineDefs: true
|
|
|
|
Layout/FirstHashElementIndentation:
|
|
Enabled: true
|
|
Exclude:
|
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
|
|
|
Layout/LineLength:
|
|
Enabled: true
|
|
AllowedPatterns: ['\A\s+test \".+\" do\z', '\A\s*\#']
|
|
Exclude:
|
|
- 'db/migrate/0*.rb'
|
|
- 'db/migrate/1*.rb'
|
|
- 'db/migrate/201*.rb'
|
|
- 'db/migrate/20200*.rb'
|
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
|
|
|
Layout/RescueEnsureAlignment:
|
|
Enabled: true
|
|
Exclude:
|
|
- 'db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb'
|
|
|
|
Layout/SpaceAroundEqualsInParameterDefault:
|
|
Enabled: false
|
|
|
|
Layout/SpaceBeforeSemicolon:
|
|
Enabled: true
|
|
Exclude:
|
|
- 'config/initializers/10-patches.rb'
|
|
|
|
Layout/SpaceBeforeBlockBraces:
|
|
# "space" is used more than "no_space".
|
|
# But "no_space" is more natural in one liner.
|
|
# str = path.to_s.split(%r{[/\\]}).select{|p| !p.blank?}.join("/")
|
|
Enabled: false
|
|
|
|
Layout/SpaceInsideBlockBraces:
|
|
Enabled: false
|
|
|
|
Layout/SpaceInsideHashLiteralBraces:
|
|
Enabled: false
|
|
|
|
Lint/RaiseException:
|
|
Enabled: true
|
|
|
|
Lint/StructNewOverride:
|
|
Enabled: true
|
|
|
|
Lint/SuppressedException:
|
|
AllowComments: true
|
|
|
|
Layout/LineContinuationLeadingSpace:
|
|
Enabled: false
|
|
|
|
Layout/TrailingWhitespace:
|
|
AllowInHeredoc: true
|
|
|
|
Metrics:
|
|
Enabled: false
|
|
|
|
Naming/AccessorMethodName:
|
|
Enabled: false
|
|
|
|
Naming/VariableNumber:
|
|
CheckMethodNames: false
|
|
CheckSymbols: false
|
|
|
|
Naming/BinaryOperatorParameterName:
|
|
Enabled: false
|
|
|
|
Naming/PredicateName:
|
|
Enabled: false
|
|
|
|
Rails/ActionControllerFlashBeforeRender:
|
|
# False positive in actions where `redirect_to_referer_or` is used
|
|
Enabled: false
|
|
|
|
Rails/ActionControllerTestCase:
|
|
Enabled: false
|
|
|
|
Rails/ActionOrder:
|
|
Enabled: false
|
|
|
|
Rails/ActiveSupportOnLoad:
|
|
Exclude:
|
|
# TODO: Need to check the impact on plugins. Disable for now.
|
|
- 'lib/redmine/preparation.rb'
|
|
|
|
Rails/BulkChangeTable:
|
|
Exclude:
|
|
- 'db/migrate/20120714122200_add_workflows_rule_fields.rb'
|
|
- 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb'
|
|
|
|
Rails/CompactBlank:
|
|
Enabled: false
|
|
|
|
Rails/Delegate:
|
|
Enabled: false
|
|
|
|
Rails/EnvironmentVariableAccess:
|
|
Enabled: false
|
|
|
|
Rails/FilePath:
|
|
Enabled: false
|
|
|
|
Rails/HelperInstanceVariable:
|
|
Enabled: false
|
|
|
|
Rails/Pluck:
|
|
Exclude:
|
|
# `pluck` is not available in Gemfile
|
|
- 'Gemfile'
|
|
|
|
Rails/RootPathnameMethods:
|
|
Enabled: false
|
|
|
|
Rails/SquishedSQLHeredocs:
|
|
Enabled: false
|
|
|
|
Rails/WhereExists:
|
|
Enabled: false
|
|
|
|
Style/AsciiComments:
|
|
Exclude:
|
|
# Copyright credit has non ascii character.
|
|
# We can not change nor remove it.
|
|
- 'app/models/repository/git.rb'
|
|
|
|
Style/BlockComments:
|
|
Enabled: true
|
|
Exclude:
|
|
- 'lib/redmine/string_array_diff/diff.rb'
|
|
- 'lib/redmine/string_array_diff/diffable.rb'
|
|
|
|
Style/BlockDelimiters:
|
|
Enabled: true
|
|
Exclude:
|
|
- 'db/migrate/007_create_journals.rb'
|
|
- 'lib/redmine/string_array_diff/diff.rb'
|
|
- 'lib/redmine/string_array_diff/diffable.rb'
|
|
|
|
Style/FetchEnvVar:
|
|
Enabled: false
|
|
|
|
Style/EmptyElse:
|
|
EnforcedStyle: empty
|
|
|
|
Style/FormatString:
|
|
EnforcedStyle: sprintf
|
|
|
|
Style/FormatStringToken:
|
|
Enabled: false
|
|
|
|
Style/FrozenStringLiteralComment:
|
|
Enabled: true
|
|
EnforcedStyle: always
|
|
Exclude:
|
|
- 'db/**/*.rb'
|
|
- 'Gemfile'
|
|
- 'Rakefile'
|
|
- 'config.ru'
|
|
- 'config/additional_environment.rb'
|
|
|
|
Style/GlobalStdStream:
|
|
Enabled: false
|
|
|
|
Style/HashEachMethods:
|
|
Enabled: true
|
|
|
|
Style/HashSyntax:
|
|
Enabled: true
|
|
EnforcedStyle: no_mixed_keys
|
|
|
|
Style/HashTransformKeys:
|
|
Enabled: true
|
|
|
|
Style/HashTransformValues:
|
|
Enabled: true
|
|
|
|
Style/IdenticalConditionalBranches:
|
|
Exclude:
|
|
- 'config/initializers/10-patches.rb'
|
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
|
|
|
Style/NegatedIfElseCondition:
|
|
Enabled: false
|
|
|
|
Style/RaiseArgs:
|
|
Enabled: false
|
|
|
|
Style/Semicolon:
|
|
Enabled: false
|
|
|
|
Style/SlicingWithRange:
|
|
Enabled: false
|
|
|
|
Style/SoleNestedConditional:
|
|
Enabled: false
|
|
|
|
Style/TernaryParentheses:
|
|
Enabled: false
|
|
|
|
Style/TrailingCommaInArrayLiteral:
|
|
Enabled: false
|
|
|
|
Style/TrailingCommaInHashLiteral:
|
|
Enabled: false
|