@@ -143,13 +143,17 @@ task :format do |_task, arguments|
143143 Rake ::Task [ 'all:format' ] . invoke ( *args )
144144end
145145
146- desc 'Run linters (may auto-fix some issues; stricter checks than :format)'
147- task :lint do
148- puts 'Linting shell scripts and GitHub Actions...'
146+ def lint_actions
149147 shellcheck = Bazel . execute ( 'build' , [ ] , '@multitool//tools/shellcheck' )
150148 Bazel . execute ( 'run' , [ '--' , '-shellcheck' , shellcheck ] , '@multitool//tools/actionlint:cwd' )
149+ end
151150
152- Rake ::Task [ 'all:lint' ] . invoke
151+ desc 'Run linters (may auto-fix some issues; stricter checks than :format)'
152+ task :lint do
153+ SeleniumRake . aggregate_errors (
154+ shellcheck_and_actionlint : -> { lint_actions } ,
155+ all : -> { Rake ::Task [ 'all:lint' ] . invoke }
156+ )
153157end
154158
155159# Legacy aliases - call namespaced tasks
@@ -215,24 +219,18 @@ namespace :all do
215219 desc 'Validate release credentials for all languages'
216220 task :check_credentials do |_task , arguments |
217221 args = arguments . to_a
218- failures = [ ]
219- %w[ java py rb dotnet node ] . each do |lang |
220- Rake ::Task [ "#{ lang } :check_credentials" ] . invoke ( *args )
221- rescue StandardError => e
222- failures << "#{ lang } : #{ e . message } "
222+ steps = %w[ java py rb dotnet node ] . to_h do |lang |
223+ [ lang . to_sym , -> { Rake ::Task [ "#{ lang } :check_credentials" ] . invoke ( *args ) } ]
223224 end
224- raise "Credential check failed: \n #{ failures . join ( " \n " ) } " unless failures . empty?
225+ SeleniumRake . aggregate_errors ( ** steps )
225226 end
226227
227228 desc 'Verify all packages are published to their registries'
228229 task :verify do
229- failures = [ ]
230- %w[ java py rb dotnet node ] . each do |lang |
231- Rake ::Task [ "#{ lang } :verify" ] . invoke
232- rescue StandardError => e
233- failures << "#{ lang } : #{ e . message } "
230+ steps = %w[ java py rb dotnet node ] . to_h do |lang |
231+ [ lang . to_sym , -> { Rake ::Task [ "#{ lang } :verify" ] . invoke } ]
234232 end
235- raise "Verification failed: \n #{ failures . join ( " \n " ) } " unless failures . empty?
233+ SeleniumRake . aggregate_errors ( ** steps )
236234 end
237235
238236 desc 'Release all artifacts for all language bindings'
@@ -257,15 +255,10 @@ namespace :all do
257255
258256 desc 'Run linters for all language bindings'
259257 task :lint do
260- all_langs = %w[ java py rb dotnet node ]
261- failures = [ ]
262- all_langs . each do |lang |
263- puts "Linting #{ lang } ..."
264- Rake ::Task [ "#{ lang } :lint" ] . invoke
265- rescue StandardError => e
266- failures << "#{ lang } : #{ e . message } "
258+ steps = %w[ java py rb dotnet node ] . to_h do |lang |
259+ [ lang . to_sym , -> { Rake ::Task [ "#{ lang } :lint" ] . invoke } ]
267260 end
268- raise "Lint failed: \n #{ failures . join ( " \n " ) } " unless failures . empty?
261+ SeleniumRake . aggregate_errors ( ** steps )
269262 end
270263
271264 desc 'Update versions for all language bindings'
0 commit comments