summaryrefslogtreecommitdiffstats
path: root/.rubocop.yml
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-06-19 00:49:28 +0000
committerGo MAEDA <maeda@farend.jp>2019-06-19 00:49:28 +0000
commit8baddf11bc59d6cffc0a3119fe11b290ff714664 (patch)
tree3f309edfbfa916a65a3cf9e393dced2fac2c803e /.rubocop.yml
parentdd55d8f7e71620c1c8e85f765ac124d71acaed20 (diff)
downloadredmine-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.yml44
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