diff options
Diffstat (limited to 'cmd/krino/sort.go')
| -rw-r--r-- | cmd/krino/sort.go | 9 |
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 |
