Skip to content

Commit 1f428f7

Browse files
committed
Always show complexity as X of 1000; benchmarks skip complexity output
- max_possible is always 1000 (the global complexity cap), not the max complexity in the current run. Running -s basics shows '1000 of 1000' not '500 of 500'. - Benchmark runs already return early before the complexity summary, so no complexity line appears for --bench runs.
1 parent 6642d75 commit 1f428f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/liquid/spec/cli/runner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def run_specs_frozen(config, options, run_id)
496496
# never an interpolated number.
497497
sorted_complexities = results_by_complexity.keys.sort
498498
first_failure_complexity = results_by_complexity.select { |_, r| r[:fail] > 0 || r[:error] > 0 }.keys.min
499-
max_possible = sorted_complexities.max || 0
499+
max_possible = 1000 # always 1000 — the global complexity cap
500500
max_complexity_reached = if first_failure_complexity
501501
sorted_complexities.select { |c| c < first_failure_complexity }.max || 0
502502
else

0 commit comments

Comments
 (0)