(PDOC-8) Add rubocop to travis job
In order to ensure long term code quality, add a rubocop check to the travis job which runs when a pull request is submitted. Do this by adding a rake task for rubocop and setting up travis to run both the spec rake task and the rubocop one. Additionally, make a few changes to the .rubocop.yml file so it will stop complaining about incorrect namespaces.
This commit is contained in:
parent
999daa9c4c
commit
1abca4705f
12
.rubocop.yml
12
.rubocop.yml
|
@ -65,7 +65,7 @@ Style/RedundantSelf:
|
|||
Enabled: false
|
||||
|
||||
# DISABLED - not useful
|
||||
Style/MethodLength:
|
||||
Metrics/MethodLength:
|
||||
Enabled: false
|
||||
|
||||
# DISABLED - not useful
|
||||
|
@ -143,7 +143,7 @@ Style/AlignHash:
|
|||
Style/AlignParameters:
|
||||
Enabled: false
|
||||
|
||||
Style/BlockNesting:
|
||||
Metrics/BlockNesting:
|
||||
Enabled: false
|
||||
|
||||
Style/AsciiComments:
|
||||
|
@ -176,7 +176,7 @@ Style/ClassAndModuleChildren:
|
|||
Style/ClassCheck:
|
||||
Enabled: false
|
||||
|
||||
Style/ClassLength:
|
||||
Metrics/ClassLength:
|
||||
Enabled: false
|
||||
|
||||
Style/ClassMethods:
|
||||
|
@ -264,7 +264,7 @@ Style/ColonMethodCall:
|
|||
Style/CommentAnnotation:
|
||||
Enabled: false
|
||||
|
||||
Style/CyclomaticComplexity:
|
||||
Metrics/CyclomaticComplexity:
|
||||
Enabled: false
|
||||
|
||||
Style/ConstantName:
|
||||
|
@ -316,7 +316,7 @@ Style/EmptyLinesAroundBody:
|
|||
Style/EmptyLiteral:
|
||||
Enabled: false
|
||||
|
||||
Style/LineLength:
|
||||
Metrics/LineLength:
|
||||
Enabled: false
|
||||
|
||||
Style/MethodCallParentheses:
|
||||
|
@ -472,7 +472,7 @@ Style/RegexpLiteral:
|
|||
Lint/UnderscorePrefixedVariableName:
|
||||
Enabled: false
|
||||
|
||||
Style/ParameterLists:
|
||||
Metrics/ParameterLists:
|
||||
Enabled: false
|
||||
|
||||
Lint/RequireParentheses:
|
||||
|
|
12
.travis.yml
12
.travis.yml
|
@ -1,17 +1,17 @@
|
|||
language: ruby
|
||||
bundler_args: --without development
|
||||
script: "bundle exec rake spec SPEC_OPTS='--color --format documentation'"
|
||||
script:
|
||||
- "bundle exec rake $CHECK"
|
||||
notifications:
|
||||
email: false
|
||||
rvm:
|
||||
- 1.9.3
|
||||
- 2.0.0
|
||||
- 2.1.0
|
||||
- ruby-head
|
||||
|
||||
env:
|
||||
- PUPPET_VERSION=3.6.2
|
||||
- PUPPET_VERSION=3.7.1
|
||||
- "CHECK=spec SPEC_OPTS='--color --format documentation'"
|
||||
- "CHECK=rubocop"
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- rvm: ruby-head
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -21,10 +21,10 @@ group :test do
|
|||
gem 'serverspec'
|
||||
gem 'beaker'
|
||||
gem 'beaker-rspec'
|
||||
gem 'rubocop'
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem 'pry'
|
||||
gem 'pry-debugger'
|
||||
gem 'rubocop'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue