summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-05-05 11:33:01 +0100
committerThom May <thom@may.lt>2016-05-05 11:33:01 +0100
commitb8ac88bcd8377380f5c072309c4ac7ec303695bc (patch)
tree756f4093dc49c906362486a6d8cb19cec62bdb0a /Rakefile
parentd4a68ec78296443a2a08495de18c7a944d30dd71 (diff)
downloadmixlib-cli-b8ac88bcd8377380f5c072309c4ac7ec303695bc.tar.gz
Fix chefstyle issues
Signed-off-by: Thom May <thom@may.lt>
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 7877752..4321fb1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -21,3 +21,13 @@ RDoc::Task.new do |rdoc|
rdoc.rdoc_files.include("README*")
rdoc.rdoc_files.include("lib/**/*.rb")
end
+
+begin
+ require "chefstyle"
+ require "rubocop/rake_task"
+ RuboCop::RakeTask.new(:style) do |task|
+ task.options += ["--display-cop-names", "--no-color"]
+ end
+rescue LoadError
+ puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
+end