You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. inherit_from: .rubocop_todo.yml
  2. AllCops:
  3. TargetRubyVersion: 2.4
  4. TargetRailsVersion: 5.2
  5. NewCops: enable
  6. Exclude:
  7. - '**/vendor/**/*'
  8. - '**/tmp/**/*'
  9. - '**/bin/**/*'
  10. - '**/plugins/**/*'
  11. - '**/extra/**/*'
  12. - '**/lib/generators/**/templates/*'
  13. - '**/lib/tasks/**/*'
  14. - '**/files/**/*'
  15. - 'db/schema.rb'
  16. # Enable extensions
  17. require:
  18. - rubocop-performance
  19. - rubocop-rails
  20. # Rules for Redmine
  21. Bundler/OrderedGems:
  22. Enabled: false
  23. Layout/CaseIndentation:
  24. Exclude:
  25. - 'config/initializers/10-patches.rb'
  26. Layout/EmptyLineBetweenDefs:
  27. AllowAdjacentOneLineDefs: true
  28. Layout/SpaceAroundEqualsInParameterDefault:
  29. Enabled: false
  30. Layout/SpaceBeforeBlockBraces:
  31. # "space" is used more than "no_space".
  32. # But "no_space" is more natural in one liner.
  33. # str = path.to_s.split(%r{[/\\]}).select{|p| !p.blank?}.join("/")
  34. Enabled: false
  35. Layout/SpaceInsideBlockBraces:
  36. EnforcedStyle: no_space
  37. SpaceBeforeBlockParameters: false
  38. Layout/SpaceInsideHashLiteralBraces:
  39. Enabled: false
  40. Lint/RaiseException:
  41. Enabled: true
  42. Lint/StructNewOverride:
  43. Enabled: true
  44. Lint/SuppressedException:
  45. AllowComments: true
  46. Layout/TrailingWhitespace:
  47. AllowInHeredoc: true
  48. Metrics:
  49. Enabled: false
  50. Naming/AccessorMethodName:
  51. Enabled: false
  52. Naming/BinaryOperatorParameterName:
  53. Enabled: false
  54. Naming/PredicateName:
  55. Enabled: false
  56. Rails/BulkChangeTable:
  57. Exclude:
  58. - 'db/migrate/20120714122200_add_workflows_rule_fields.rb'
  59. - 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb'
  60. Rails/HelperInstanceVariable:
  61. Enabled: false
  62. Style/AsciiComments:
  63. Exclude:
  64. # Copyright credit has non ascii character.
  65. # We can not change nor remove it.
  66. - 'app/models/repository/git.rb'
  67. Style/EmptyElse:
  68. EnforcedStyle: empty
  69. Style/FormatString:
  70. EnforcedStyle: sprintf
  71. Style/FormatStringToken:
  72. Enabled: false
  73. Style/FrozenStringLiteralComment:
  74. Enabled: true
  75. EnforcedStyle: always
  76. Exclude:
  77. - 'db/**/*.rb'
  78. - 'Gemfile'
  79. - 'Rakefile'
  80. - 'config.ru'
  81. - 'config/additional_environment.rb'
  82. Style/HashEachMethods:
  83. Enabled: true
  84. Style/HashSyntax:
  85. Enabled: true
  86. EnforcedStyle: no_mixed_keys
  87. Style/HashTransformKeys:
  88. Enabled: true
  89. Style/HashTransformValues:
  90. Enabled: true
  91. Style/IdenticalConditionalBranches:
  92. Exclude:
  93. - 'config/initializers/10-patches.rb'
  94. - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
  95. Style/RaiseArgs:
  96. Enabled: false
  97. Style/TrailingCommaInArrayLiteral:
  98. Enabled: false
  99. Style/TrailingCommaInHashLiteral:
  100. Enabled: false