aboutsummaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorTim Meusel <tim@bastelfreak.de>2019-01-24 23:13:09 +0100
committerTim Meusel <tim@bastelfreak.de>2019-01-24 23:13:24 +0100
commit643604cf33d0a7bcddeca53f7c9e62684ef108f0 (patch)
treed1301539acb6f590e1fbe3bac84147fdaaa63a92 /Rakefile
parent3612961ef7599afe37e224271629eb721965536c (diff)
downloadpuppet-ferm-643604cf33d0a7bcddeca53f7c9e62684ef108f0.tar.gz
puppet-ferm-643604cf33d0a7bcddeca53f7c9e62684ef108f0.tar.bz2
modulesync 2.5.1
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 279580a..13ef17c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -37,12 +37,27 @@ RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
end
-desc 'Run tests metadata_lint, release_checks'
+desc 'Run tests release_checks'
task test: [
- :metadata_lint,
:release_checks,
]
+namespace :check do
+ desc 'Check for trailing whitespace'
+ task :trailing_whitespace do
+ Dir.glob('**/*.md', File::FNM_DOTMATCH).sort.each do |filename|
+ next if filename =~ %r{^((modules|acceptance|\.?vendor|spec/fixtures|pkg)/|REFERENCE.md)}
+ File.foreach(filename).each_with_index do |line, index|
+ if line =~ %r{\s\n$}
+ puts "#{filename} has trailing whitespace on line #{index + 1}"
+ exit 1
+ end
+ end
+ end
+ end
+end
+Rake::Task[:release_checks].enhance ['check:trailing_whitespace']
+
desc "Run main 'test' task and report merged results to coveralls"
task test_with_coveralls: [:test] do
if Dir.exist?(File.expand_path('../lib', __FILE__))