diff options
author | Go MAEDA <maeda@farend.jp> | 2019-06-19 00:49:28 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-06-19 00:49:28 +0000 |
commit | 8baddf11bc59d6cffc0a3119fe11b290ff714664 (patch) | |
tree | 3f309edfbfa916a65a3cf9e393dced2fac2c803e /.rubocop.yml | |
parent | dd55d8f7e71620c1c8e85f765ac124d71acaed20 (diff) | |
download | redmine-8baddf11bc59d6cffc0a3119fe11b290ff714664.tar.gz redmine-8baddf11bc59d6cffc0a3119fe11b290ff714664.zip |
Add RuboCop to enforce some styles (#31509).
Patch by Marius BALTEANU and Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@18259 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to '.rubocop.yml')
-rw-r--r-- | .rubocop.yml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 000000000..976368f89 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,44 @@ +inherit_from: .rubocop_todo.yml + +AllCops: + TargetRubyVersion: 2.3 + TargetRailsVersion: 5.2 + + Exclude: + - '**/vendor/**/*' + - '**/tmp/**/*' + - '**/bin/**/*' + - '**/plugins/**/*' + - '**/extra/**/*' + - '**/lib/generators/**/templates/*' + - '**/lib/tasks/**/*' + - '**/files/**/*' + +# Enable extensions + +Rails: + Enabled: true + +# Rules for Redmine + +Layout/SpaceBeforeBlockBraces: + Enabled: false + +Rails/BulkChangeTable: + Exclude: + - 'db/migrate/20120714122200_add_workflows_rule_fields.rb' + - 'db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb' + +Style/FrozenStringLiteralComment: + Enabled: true + EnforcedStyle: always + Exclude: + - 'db/**/*.rb' + - 'Gemfile' + - 'Rakefile' + - 'config.ru' + - 'config/additional_environment.rb' + +Style/HashSyntax: + Enabled: true + EnforcedStyle: no_mixed_keys |