From 63f8afa5f1da35d8053d6af09b9e68f77fb41a54 Mon Sep 17 00:00:00 2001 From: Richard Clamp Date: Mon, 27 Oct 2014 10:30:29 +0000 Subject: [PATCH] add rubocop target to Rakefile Here we copy the 'rubocop' action from puppet's Rakefile --- Rakefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Rakefile b/Rakefile index 7f63e416..72ce9dd5 100644 --- a/Rakefile +++ b/Rakefile @@ -107,3 +107,14 @@ task :website => :clean do safe_system("tar -cvzf marionette-collective-org-#{Time.now.to_i}.tgz marionette-collective.org") end end + +desc 'run static analysis with rubocop' +task(:rubocop) do + if RUBY_VERSION !~ /1.8/ + require 'rubocop' + cli = RuboCop::CLI.new + cli.run(%w(-D -f s)) + else + puts "Rubocop is disabled in ruby 1.8" + end +end