The help for --check says: "Exit with 1 if running with --write would cause at least some file to change (and print a list of such files); otherwise exit with 0."
The actual behaviour is that if the first file given on the command line needs formatting, its name is printed and the exit code is 1. If the first file doesn't need formatting, the remaining files are not examined and the exit code is 0.
The help for
--check
says: "Exit with 1 if running with--write
would cause at least some file to change (and print a list of such files); otherwise exit with 0."The actual behaviour is that if the first file given on the command line needs formatting, its name is printed and the exit code is 1. If the first file doesn't need formatting, the remaining files are not examined and the exit code is 0.