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.

.rubocop.yml 2.3KB

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