2019-06-19 00:49:28 +00:00
|
|
|
inherit_from: .rubocop_todo.yml
|
|
|
|
|
|
|
|
|
|
AllCops:
|
2020-10-23 00:17:13 +00:00
|
|
|
TargetRubyVersion: 2.4
|
2019-06-19 00:49:28 +00:00
|
|
|
TargetRailsVersion: 5.2
|
|
|
|
|
|
|
|
|
|
Exclude:
|
|
|
|
|
- '**/vendor/**/*'
|
|
|
|
|
- '**/tmp/**/*'
|
|
|
|
|
- '**/bin/**/*'
|
|
|
|
|
- '**/plugins/**/*'
|
|
|
|
|
- '**/extra/**/*'
|
|
|
|
|
- '**/lib/generators/**/templates/*'
|
|
|
|
|
- '**/lib/tasks/**/*'
|
|
|
|
|
- '**/files/**/*'
|
2019-10-16 13:00:18 +00:00
|
|
|
- 'db/schema.rb'
|
2019-06-19 00:49:28 +00:00
|
|
|
|
|
|
|
|
# Enable extensions
|
|
|
|
|
|
2019-06-26 23:37:09 +00:00
|
|
|
require:
|
2019-08-18 14:40:47 +00:00
|
|
|
- rubocop-performance
|
2019-06-26 23:37:09 +00:00
|
|
|
- rubocop-rails
|
2019-06-19 00:49:28 +00:00
|
|
|
|
|
|
|
|
# Rules for Redmine
|
|
|
|
|
|
2019-10-23 04:57:44 +00:00
|
|
|
Bundler/OrderedGems:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-11-20 17:05:13 +00:00
|
|
|
Layout/CaseIndentation:
|
|
|
|
|
Exclude:
|
|
|
|
|
- 'config/initializers/10-patches.rb'
|
|
|
|
|
|
2019-10-14 18:57:13 +00:00
|
|
|
Layout/EmptyLineBetweenDefs:
|
|
|
|
|
AllowAdjacentOneLineDefs: true
|
|
|
|
|
|
2019-06-19 00:49:28 +00:00
|
|
|
Layout/SpaceBeforeBlockBraces:
|
2019-10-26 12:53:48 +00:00
|
|
|
# "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
|
2019-06-19 00:49:28 +00:00
|
|
|
|
2019-10-23 06:44:31 +00:00
|
|
|
# You can see results by "rubocop --only Layout/SpaceInsideBlockBraces"
|
2019-08-25 15:33:53 +00:00
|
|
|
Layout/SpaceInsideBlockBraces:
|
2019-10-23 06:44:31 +00:00
|
|
|
EnforcedStyle: no_space
|
|
|
|
|
SpaceBeforeBlockParameters: false
|
2019-08-25 15:33:53 +00:00
|
|
|
|
2019-10-23 13:31:59 +00:00
|
|
|
# You can see results by "rubocop --only Layout/SpaceInsideHashLiteralBraces"
|
2019-10-03 00:08:02 +00:00
|
|
|
Layout/SpaceInsideHashLiteralBraces:
|
2019-10-23 13:31:59 +00:00
|
|
|
EnforcedStyle: no_space
|
2019-10-03 00:08:02 +00:00
|
|
|
|
2020-04-05 05:45:22 +00:00
|
|
|
Lint/RaiseException:
|
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
|
|
Lint/StructNewOverride:
|
|
|
|
|
Enabled: true
|
|
|
|
|
|
2019-11-29 07:36:15 +00:00
|
|
|
Lint/SuppressedException:
|
|
|
|
|
AllowComments: true
|
|
|
|
|
|
2019-08-03 07:50:03 +00:00
|
|
|
Layout/TrailingWhitespace:
|
|
|
|
|
AllowInHeredoc: true
|
|
|
|
|
|
2019-06-20 13:20:02 +00:00
|
|
|
Metrics:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-09-25 04:35:40 +00:00
|
|
|
Naming/AccessorMethodName:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-09-21 14:11:19 +00:00
|
|
|
Naming/BinaryOperatorParameterName:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-09-13 02:25:23 +00:00
|
|
|
Naming/PredicateName:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-06-19 00:49:28 +00:00
|
|
|
Rails/BulkChangeTable:
|
|
|
|
|
Exclude:
|
|
|
|
|
- 'db/migrate/20120714122200_add_workflows_rule_fields.rb'
|
|
|
|
|
- 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb'
|
|
|
|
|
|
2019-09-21 14:11:07 +00:00
|
|
|
Rails/HelperInstanceVariable:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-10-09 02:05:49 +00:00
|
|
|
Style/AsciiComments:
|
|
|
|
|
Exclude:
|
|
|
|
|
# Copyright credit has non ascii character.
|
|
|
|
|
# We can not change nor remove it.
|
|
|
|
|
- 'app/models/repository/git.rb'
|
|
|
|
|
|
2019-11-20 17:05:35 +00:00
|
|
|
Style/EmptyElse:
|
|
|
|
|
EnforcedStyle: empty
|
|
|
|
|
|
2020-04-05 04:29:28 +00:00
|
|
|
Style/FormatString:
|
|
|
|
|
EnforcedStyle: sprintf
|
|
|
|
|
|
2019-10-01 03:18:39 +00:00
|
|
|
Style/FormatStringToken:
|
|
|
|
|
Enabled: false
|
|
|
|
|
|
2019-06-19 00:49:28 +00:00
|
|
|
Style/FrozenStringLiteralComment:
|
|
|
|
|
Enabled: true
|
|
|
|
|
EnforcedStyle: always
|
|
|
|
|
Exclude:
|
|
|
|
|
- 'db/**/*.rb'
|
|
|
|
|
- 'Gemfile'
|
|
|
|
|
- 'Rakefile'
|
|
|
|
|
- 'config.ru'
|
|
|
|
|
- 'config/additional_environment.rb'
|
|
|
|
|
|
2020-02-19 13:45:34 +00:00
|
|
|
Style/HashEachMethods:
|
|
|
|
|
Enabled: true
|
|
|
|
|
|
2019-06-19 00:49:28 +00:00
|
|
|
Style/HashSyntax:
|
|
|
|
|
Enabled: true
|
|
|
|
|
EnforcedStyle: no_mixed_keys
|
2019-10-15 17:25:53 +00:00
|
|
|
|
2020-02-19 13:45:34 +00:00
|
|
|
Style/HashTransformKeys:
|
|
|
|
|
Enabled: true
|
|
|
|
|
|
|
|
|
|
Style/HashTransformValues:
|
|
|
|
|
Enabled: true
|
|
|
|
|
|
2019-10-15 17:25:53 +00:00
|
|
|
Style/IdenticalConditionalBranches:
|
|
|
|
|
Exclude:
|
|
|
|
|
- 'config/initializers/10-patches.rb'
|
|
|
|
|
- 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
|
2019-10-16 13:00:29 +00:00
|
|
|
|
|
|
|
|
Style/TrailingCommaInArrayLiteral:
|
|
|
|
|
Enabled: false
|
2019-11-20 17:12:40 +00:00
|
|
|
|
|
|
|
|
Style/TrailingCommaInHashLiteral:
|
|
|
|
|
Enabled: false
|