(maint) Add rubocop for testing

This commit adds the rubocop gem, a rubocop rake task and an initial rubocop
configuration file in prepartion for using rubocop in CI.

This commit also adds a rubocop todo file that exempts existing files from
violations.
This commit is contained in:
Glenn Sarti 2017-02-09 13:30:29 -08:00
parent 71a5af9e88
commit 85a2fa4f20
4 changed files with 578 additions and 0 deletions

43
.rubocop.yml Normal file
View file

@ -0,0 +1,43 @@
inherit_from: .rubocop_todo.yml
AllCops:
Include:
- 'lib/**/*.rb'
- 'vmpooler'
Exclude:
- 'lib/public/lib/**/*'
- 'scripts/**/*'
- 'spec/**/*'
- 'vendor/**/*'
Style/Documentation:
Enabled: false
# Line length is not useful
Metrics/LineLength:
Enabled: false
# Due to legacy codebase
# - Globals are used liberally
Style/GlobalVars:
Enabled: false
# - A lot of complexity
Metrics/AbcSize:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
# - Long Methods, Classes and blocks
Metrics/MethodLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/BlockLength:
Enabled: false
# Either sytnax for regex is ok
Style/RegexpLiteral:
Enabled: false