Add basic rubocop configuraton for Hound

This way we can ask contributors to follow some basic guidelines like
removing trailing whitespaces while not overwhelming them with all our
rules.
This commit is contained in:
Javi Martín
2018-10-26 11:37:07 +02:00
parent 48140f74e9
commit 4048d17203
3 changed files with 31 additions and 28 deletions

2
.hound.yml Normal file
View File

@@ -0,0 +1,2 @@
rubocop:
config_file: .rubocop_basic.yml

View File

@@ -1,35 +1,8 @@
require: rubocop-rspec inherit_from: .rubocop_basic.yml
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
TargetRubyVersion: 2.3
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Metrics/LineLength: Metrics/LineLength:
Max: 100 Max: 100
Layout/IndentationConsistency:
EnforcedStyle: rails
Layout/EndOfLine:
EnforcedStyle: lf
Layout/TrailingBlankLines:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true
Bundler/DuplicatedGem: Bundler/DuplicatedGem:
Enabled: true Enabled: true

28
.rubocop_basic.yml Normal file
View File

@@ -0,0 +1,28 @@
require: rubocop-rspec
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
Include:
- '**/Rakefile'
- '**/config.ru'
Exclude:
- 'db/**/*'
- 'config/**/*'
- 'script/**/*'
TargetRubyVersion: 2.3
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Layout/IndentationConsistency:
EnforcedStyle: rails
Layout/EndOfLine:
EnforcedStyle: lf
Layout/TrailingBlankLines:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true