From b8ac88bcd8377380f5c072309c4ac7ec303695bc Mon Sep 17 00:00:00 2001 From: Thom May Date: Thu, 5 May 2016 11:33:01 +0100 Subject: Fix chefstyle issues Signed-off-by: Thom May --- Rakefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Rakefile') 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 -- cgit v1.2.1