diff options
author | Thom May <thom@may.lt> | 2015-08-17 16:44:44 +0100 |
---|---|---|
committer | Thom May <thom@may.lt> | 2015-08-17 16:46:48 +0100 |
commit | ebe0ead11773a8b6fbb14bf6784d4a7ed56b78d1 (patch) | |
tree | 330bcc7c2065a10af76dc963f41b1044040c64e5 | |
parent | 0c7303f9cd3ab997bfe174c2741c4d1714ee15bb (diff) | |
download | ohai-tm/rubocop.tar.gz |
Rubocop-ifytm/rubocop
-rw-r--r-- | .rubocop.yml | 17 | ||||
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | Rakefile | 6 | ||||
-rw-r--r-- | ohai.gemspec | 1 |
4 files changed, 24 insertions, 1 deletions
diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 00000000..980f710b --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,17 @@ +AllCops: + Exclude: + - "pkg/**/*" + +Metrics/LineLength: + Max: 100 + Exclude: + - spec/**/*.rb + +Style/StringLiterals: + EnforcedStyle: double_quotes + +Style/StringLiteralsInInterpolation: + EnforcedStyle: double_quotes + +Style/NumericLiterals: + Enabled: false diff --git a/.travis.yml b/.travis.yml index cb194cd9..0d2a3f86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,5 +16,6 @@ rvm: - 2.2 script: + - bundle exec rake rubocop - bundle exec rake spec - bundle exec ohai @@ -1,6 +1,6 @@ require "bundler/gem_tasks" -require 'date' require 'ohai/version' +require "rubocop/rake_task" begin require 'rspec/core/rake_task' @@ -15,4 +15,8 @@ rescue LoadError end end +RuboCop::RakeTask.new do |task| + task.options << "--display-cop-names" +end + task :default => :spec diff --git a/ohai.gemspec b/ohai.gemspec index 915068b4..b6ee9c2f 100644 --- a/ohai.gemspec +++ b/ohai.gemspec @@ -42,6 +42,7 @@ Gem::Specification.new do |s| s.add_development_dependency "rspec-collection_matchers", "~> 1.0" s.add_development_dependency "rspec_junit_formatter" s.add_development_dependency "chef" + s.add_development_dependency "rubocop" s.bindir = "bin" s.executables = %w(ohai) |