Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ rescue LoadError
warn "Warning: RSpec is not installed. Please run `gem install rspec` to install RSpec."
end

abort "yamllint is not installed. Install it with: pip install yamllint" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to block all tasks in here? You can make special check-yamllint task doing this check (and aborting) and make it other tasks dependency like task :yamllint=> :check-yamllint.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's your answer?

unless system("which yamllint > /dev/null 2>&1")

if defined?(RSpec::Core::RakeTask)
namespace :lint do
desc "Lint reports (excluding schema validation)"
Expand All @@ -21,7 +24,18 @@ if defined?(RSpec::Core::RakeTask)

desc "Run all linting tasks"
task :lint => [ 'lint:schema', 'lint:yaml' ]
task :default => [ :lint ]

desc "Run rad-ignores.sh to generate ignore patterns"
task :ignores do
sh "bash lib/rad-ignores.sh"
end

desc "Run yamllint command on all 'gems/*/*.yml' and 'rubies/*/*.yml' files"
task :yamllint do
sh "yamllint gems rubies"
end

task :default => [ :lint, :ignores, :yamllint ]
end

desc "Sync GitHub RubyGem Advisories into this project"
Expand Down