Commit 03a8cb35 authored by Marius Rackwitz's avatar Marius Rackwitz

[Rakefile] Integrate inch in spec task

parent 46377785
...@@ -141,6 +141,9 @@ begin ...@@ -141,6 +141,9 @@ begin
title 'Running RuboCop' title 'Running RuboCop'
Rake::Task['rubocop'].invoke Rake::Task['rubocop'].invoke
title 'Running Inch'
Rake::Task['inch:spec'].invoke
end end
namespace :fixture_tarballs do namespace :fixture_tarballs do
...@@ -295,6 +298,18 @@ begin ...@@ -295,6 +298,18 @@ begin
sh 'bundle exec rubocop lib spec Rakefile' sh 'bundle exec rubocop lib spec Rakefile'
end end
#-- Inch -------------------------------------------------------------------#
namespace :inch do
desc 'Lint the completeness of the documentation with Inch'
task :spec do
sh "inch --all --no-undocumented list | tee tmp/inch.txt"
sh "grep -q 'Nothing to suggest.' tmp/inch.txt" do |ok, _|
fail red('✗ Improve above suggestions.') unless ok
end
end
end
rescue LoadError, NameError => e rescue LoadError, NameError => e
$stderr.puts "\033[0;31m" \ $stderr.puts "\033[0;31m" \
'[!] Some Rake tasks haven been disabled because the environment' \ '[!] Some Rake tasks haven been disabled because the environment' \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment