tc39 / ecmarkup

An HTML superset/Markdown subset source format for ECMAScript and related specifications
https://tc39.es/ecmarkup/
MIT License
221 stars 63 forks source link

emu-format --check only checks the first file on the command line #606

Closed ptomato closed 2 months ago

ptomato commented 2 months ago

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.