Rakefile:33-35 reads CLI flags out of ARGV to switch the judges task behavior:
task :judges do
live = ARGV.include?('--live') ? '' : '--disable live'
sh "judges #{ARGV.include?('--verbose') ? '--verbose' : ''} test --no-log #{live} --lib lib judges"
end
Rake parses ARGV before any task body runs and treats every non-option positional token as a task name. Running bundle exec rake judges --live makes Rake parse --live against its own option set and abort with invalid option: --live, so the live branch is unreachable from the documented CLI. Running bundle exec rake judges -- --live does not help either, because the trailing --live ends up in ARGV but Rake first interprets the -- as the end of its own options. The --verbose branch has the same defect; the only reason it does not abort is that Rake itself accepts --verbose, and that flag never reaches the judges test invocation in the form the code expects.
The current Rakefile.default task chain (clean test judges rubocop) silences the issue because nobody ever passes --live or --verbose to rake, so both branches always take the no-op path. The flag-routing code is dead.
Fix: switch to task arguments, e.g. task :judges, [:live] do |_, args| invoked as rake "judges[live]", or read the flags from environment variables (ENV['LIVE'], ENV['VERBOSE']). Both patterns are robust against Rake's argument parser.
Rakefile:33-35reads CLI flags out ofARGVto switch thejudgestask behavior:Rake parses
ARGVbefore any task body runs and treats every non-option positional token as a task name. Runningbundle exec rake judges --livemakes Rake parse--liveagainst its own option set and abort withinvalid option: --live, so thelivebranch is unreachable from the documented CLI. Runningbundle exec rake judges -- --livedoes not help either, because the trailing--liveends up inARGVbut Rake first interprets the--as the end of its own options. The--verbosebranch has the same defect; the only reason it does not abort is that Rake itself accepts--verbose, and that flag never reaches thejudges testinvocation in the form the code expects.The current
Rakefile.defaulttask chain (clean test judges rubocop) silences the issue because nobody ever passes--liveor--verbosetorake, so both branches always take the no-op path. The flag-routing code is dead.Fix: switch to task arguments, e.g.
task :judges, [:live] do |_, args|invoked asrake "judges[live]", or read the flags from environment variables (ENV['LIVE'],ENV['VERBOSE']). Both patterns are robust against Rake's argument parser.