From b8cc38ab61bf41b1e1cce46ba8931d3a2e3ff530 Mon Sep 17 00:00:00 2001 From: Al Snow <43523+jasnow@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:18:16 -0400 Subject: [PATCH 1/2] add-ignores-and-yamllint-to-rake --- Rakefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 4b5648a2e6..238077208d 100644 --- a/Rakefile +++ b/Rakefile @@ -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" \ + unless system("which yamllint > /dev/null 2>&1") + if defined?(RSpec::Core::RakeTask) namespace :lint do desc "Lint reports (excluding schema validation)" @@ -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" From 275c2f68f9e9127b5237f5715dd902b9dc19dd30 Mon Sep 17 00:00:00 2001 From: Al Snow <43523+jasnow@users.noreply.github.com> Date: Sat, 13 Jun 2026 14:38:23 -0400 Subject: [PATCH 2/2] Changed Rakefile based on PR feedback --- Rakefile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Rakefile b/Rakefile index 238077208d..0ba1e9698b 100644 --- a/Rakefile +++ b/Rakefile @@ -6,9 +6,6 @@ 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" \ - unless system("which yamllint > /dev/null 2>&1") - if defined?(RSpec::Core::RakeTask) namespace :lint do desc "Lint reports (excluding schema validation)" @@ -23,23 +20,22 @@ if defined?(RSpec::Core::RakeTask) end desc "Run all linting tasks" - task :lint => [ 'lint:schema', 'lint:yaml' ] - - desc "Run rad-ignores.sh to generate ignore patterns" - task :ignores do - sh "bash lib/rad-ignores.sh" - end + task :lint => [ 'lint:schema', 'lint:yaml', :yamllint ] desc "Run yamllint command on all 'gems/*/*.yml' and 'rubies/*/*.yml' files" task :yamllint do + abort "yamllint is not installed. Install it with: pip install yamllint" \ + unless system("which yamllint > /dev/null 2>&1") + sh "yamllint gems rubies" end - task :default => [ :lint, :ignores, :yamllint ] + task :default => [ :lint ] end desc "Sync GitHub RubyGem Advisories into this project" task :sync_github_advisories, [:gem_name] do |_, args| require_relative "lib/github_advisory_sync" GitHub::GitHubAdvisorySync.sync(gem_name: args[:gem_name]) + sh "bash lib/rad-ignores.sh" end