Skip to content

Commit

Permalink
add rubocop target to Rakefile
Browse files Browse the repository at this point in the history
Here we copy the 'rubocop' action from puppet's Rakefile
  • Loading branch information
richardc committed Oct 27, 2014
1 parent fbeafd9 commit 63f8afa
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 63f8afa

Please sign in to comment.