File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,9 +26,10 @@ def lintStyleCli (args : Cli.Parsed) : IO UInt32 := do
2626 for s in ["Archive.lean" , "Counterexamples.lean" , "Mathlib.lean" ] do
2727 let n ← lintAllFiles (System.mkFilePath [s]) errorStyle
2828 numberErrorFiles := numberErrorFiles + n
29- -- Make sure to return an exit code of at most 125, so this return value can be used further
30- -- in shell scripts.
31- return min numberErrorFiles 125
29+ -- Make sure this return value can be used further in shell scripts:
30+ -- exit codes 125 and 126 are disallowed, as is any number higher than 128.
31+ if numberErrorFiles == 128 then return 128
32+ else return min numberErrorFiles 125
3233
3334/-- Setting up command line options and help text for `lake exe lint_style`. -/
3435-- so far, no help options or so: perhaps that is fine?
Original file line number Diff line number Diff line change @@ -68,9 +68,10 @@ def mkAllCLI (args : Parsed) : IO UInt32 := do
6868 updates := updates + 1
6969 if updates == 0 then
7070 IO.println "No update necessary"
71- -- Make sure to return an exit code of at most 125, so this return value can be used further
72- -- in shell scripts.
73- return min updates 125
71+ -- Make sure this return value can be used further in shell scripts:
72+ -- exit codes 125 and 126 are disallowed, as is any number higher than 128.
73+ if updates == 128 then return 128
74+ else return min updates 125
7475
7576open Cli in
7677/-- Setting up command line options and help text for `lake exe mk_all`. -/
You can’t perform that action at this time.
0 commit comments