forked from turingschool-examples/headcount
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
29 lines (29 loc) · 849 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require 'rake'
require 'rake/testtask'
namespace :sanitation do
desc "Check line lengths & whitespace with Cane"
task :lines do
puts ""
puts "== using cane to check line length =="
system("cane --no-abc --style-glob 'lib/**/*.rb' --no-doc")
puts "== done checking line length =="
puts ""
end
desc "Check method length with Reek"
task :methods do
puts ""
puts "== using reek to check method length =="
system("reek -n lib/*.rb 2>&1 | grep -v ' 0 warnings'")
puts "== done checking method length =="
puts ""
end
desc "Check both line length and method length"
task :all => [:lines, :methods]
end
Rake::TestTask.new do |test|
test.libs << 'test'
test.warning = false
test.verbose = false
test.test_files = FileList['test/*_test.rb'].exclude("test/test_helper.rb")
end
task default: :test