aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/sort.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 14:08:36 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 14:08:36 +0200
commit1d3f2d1e4c59867024470d3444e12698b7ebb22e (patch)
tree4fa14f455c72f9b206a680dcc1b0f4c1f3708158 /cmd/krino/sort.go
parent07c24054cab965800983ef40f53a05c2db131ede (diff)
downloadkrino-1d3f2d1e4c59867024470d3444e12698b7ebb22e.tar.gz
krino-1d3f2d1e4c59867024470d3444e12698b7ebb22e.zip
0.0.4: max-size, exclude forms, --min-agev0.0.4
Diffstat (limited to 'cmd/krino/sort.go')
-rw-r--r--cmd/krino/sort.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmd/krino/sort.go b/cmd/krino/sort.go
index 6d11238..9e714ba 100644
--- a/cmd/krino/sort.go
+++ b/cmd/krino/sort.go
@@ -56,12 +56,19 @@ func cmdSort(g *globals, names []string, stdout, stderr io.Writer) int {
if g.json && !g.dry {
return usageError(stderr, "--json is only valid with -n")
}
+ minAge, setMinAge, err := minAgeOverride(g)
+ if err != nil {
+ return usageError(stderr, err.Error())
+ }
e, errs := engine.Load(mainFile(g), names...)
if len(errs) > 0 {
printDiags(stderr, errs)
return 2
}
+ if setMinAge {
+ applyMinAge(e, minAge)
+ }
p := palette{on: colourOn(g, stdout)}
// Spec §8.4: with neither -y nor -n, krino asks; asking a non-terminal
@@ -461,7 +468,7 @@ func printSkipped(w io.Writer, skipped []scan.Skipped) {
// skipReasonOrder is plan 2's reviewed order for the skip reasons the last
// line reports, before "unmatched".
-var skipReasonOrder = []scan.Reason{scan.Ignored, scan.Busy, scan.TooNew, scan.Symlink, scan.NotRegular, scan.Unreadable}
+var skipReasonOrder = []scan.Reason{scan.Ignored, scan.Busy, scan.TooNew, scan.TooBig, scan.Symlink, scan.NotRegular, scan.Unreadable}
// skipSummaryLine builds the "not acted on: N ignored · N busy · ... · N
// unmatched" line per spec §8.2's item format ("<count> <label>", not