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