diff --git a/CUSTOMIZATION.md b/CUSTOMIZATION.md index 6c959b8..a237d3f 100644 --- a/CUSTOMIZATION.md +++ b/CUSTOMIZATION.md @@ -159,6 +159,8 @@ As output, this script should emit whatever the programs it calls emit. - 0: file wouldn't be reformatted - 1: file would be reformatted - 2: file has at least one syntax error +- 3: file would be reformatted or it has at least one syntax error but we + cannot distinguish which - 252: Unexpected return value from the tool; that is, the value of `$?` is unexpected and thus unhandled - 253: Unexpected output from the tool; that is, the output emitted by the @@ -176,8 +178,8 @@ Even less unsurprisingly, Laravel pint gets it worse than all the others I checked; it doesn't distinguish files that need to be reformatted from files with actual syntax errors. -Anyway, `gofmt` is the obviously the model to follow. So we should -probably drop `1`.) +If possible, then, we should return 1 or 2 when relevant. When they can't be +distinguished, return 3.) ### in `do_format` mode diff --git a/NEW-FORMATTERS.md b/NEW-FORMATTERS.md index 19d6d12..d3761fd 100644 --- a/NEW-FORMATTERS.md +++ b/NEW-FORMATTERS.md @@ -66,6 +66,8 @@ tools does. Drop `1`. - 0: file wouldn't be reformatted - 1: file would be reformatted - 2: file has at least one syntax error +- 3: file would be reformatted or it has at least one syntax error but we + cannot distinguish which - 252: Unexpected return value from the tool; that is, the value of `$?` is unexpected and thus unhandled - 253: Unexpected output from the tool; that is, the output emitted by the