feat: -sort orders diff findings by bytes saved#36
Merged
Conversation
-sort (default off) collects findings across all scanned packages and presents them largest-first by absolute bytes saved (OldSize-NewSize), using a stable sort so equal-savings structs keep source order and unknown-size findings sink to the bottom. Diff mode only for now; inspect support follows. Part of #30 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #36 +/- ##
==========================================
+ Coverage 84.80% 85.45% +0.64%
==========================================
Files 10 10
Lines 678 708 +30
==========================================
+ Hits 575 605 +30
Misses 65 65
Partials 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
chore: try to trigger ci again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
-sort(bool, default off). In diff mode, all findings across all scanned packages are collected and presented largest-first by absolute bytes saved (OldSize - NewSize).savings()helper from feat: -summary flag (diff mode) #29. Builds on the collect-then-render refactor (refactor(app): collect findings/layouts then render #34).Inspect-mode sorting is a no-op here and lands in the next PR (which
Closes #30).Tests: with two structs saving 8 and 16 bytes,
-sortrenders the bigger first; default keeps source order.task cigreen (89 tests).Part of #30
🤖 Generated with Claude Code