Skip to content

Commit

Permalink
Added rubocop to rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
os97673 committed Aug 11, 2018
1 parent 6dc0e52 commit 0f725ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Rakefile
@@ -1,5 +1,6 @@
require "bundler/gem_tasks"
require "rake/testtask"
require 'rubocop/rake_task'

task :default => :test
Rake::TestTask.new do |t|
Expand Down Expand Up @@ -58,3 +59,12 @@ task :reset_statistics do
puts "The mean time reporter statistics have been reset."
exit 0
end

desc 'Run RuboCop on the lib directory'
RuboCop::RakeTask.new(:rubocop) do |task|
task.patterns = ['lib/**/*.rb']
# only show the files with failures
task.formatters = ['clang']
# don't abort rake on failure
task.fail_on_error = false
end
1 change: 1 addition & 0 deletions minitest-reporters.gemspec
Expand Up @@ -23,6 +23,7 @@ Gem::Specification.new do |s|

s.add_development_dependency 'maruku'
s.add_development_dependency 'rake'
s.add_development_dependency 'rubocop'

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
Expand Down

0 comments on commit 0f725ae

Please sign in to comment.