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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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/EmptyLineBetweenDefs:
  23. AllowAdjacentOneLineDefs: true
  24. Layout/SpaceBeforeBlockBraces:
  25. # "space" is used more than "no_space".
  26. # But "no_space" is more natural in one liner.
  27. # str = path.to_s.split(%r{[/\\]}).select{|p| !p.blank?}.join("/")
  28. Enabled: false
  29. # You can see results by "rubocop --only Layout/SpaceInsideBlockBraces"
  30. Layout/SpaceInsideBlockBraces:
  31. EnforcedStyle: no_space
  32. SpaceBeforeBlockParameters: false
  33. # You can see results by "rubocop --only Layout/SpaceInsideHashLiteralBraces"
  34. Layout/SpaceInsideHashLiteralBraces:
  35. EnforcedStyle: no_space
  36. Layout/TrailingWhitespace:
  37. AllowInHeredoc: true
  38. Lint/HandleExceptions:
  39. AllowComments: true
  40. Metrics:
  41. Enabled: false
  42. Naming/AccessorMethodName:
  43. Enabled: false
  44. Naming/BinaryOperatorParameterName:
  45. Enabled: false
  46. Naming/PredicateName:
  47. Enabled: false
  48. Rails/BulkChangeTable:
  49. Exclude:
  50. - 'db/migrate/20120714122200_add_workflows_rule_fields.rb'
  51. - 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb'
  52. Rails/HelperInstanceVariable:
  53. Enabled: false
  54. # Configuration parameters: AllowedChars.
  55. Style/AsciiComments:
  56. Exclude:
  57. # Copyright credit has non ascii character.
  58. # We can not change nor remove it.
  59. - 'app/models/repository/git.rb'
  60. Style/FormatStringToken:
  61. Enabled: false
  62. Style/FrozenStringLiteralComment:
  63. Enabled: true
  64. EnforcedStyle: always
  65. Exclude:
  66. - 'db/**/*.rb'
  67. - 'Gemfile'
  68. - 'Rakefile'
  69. - 'config.ru'
  70. - 'config/additional_environment.rb'
  71. Style/HashSyntax:
  72. Enabled: true
  73. EnforcedStyle: no_mixed_keys
  74. Style/IdenticalConditionalBranches:
  75. Exclude:
  76. - 'config/initializers/10-patches.rb'
  77. - 'lib/redmine/wiki_formatting/textile/redcloth3.rb'
  78. Style/TrailingCommaInArrayLiteral:
  79. Enabled: false