lua-fmt
lua-fmt copied to clipboard
Exit with code EX_DATAERR if --list-different and formatting needed
Why
In order to ensure lua-fmt
has been run
We want to be able to run lua-fmt --list-different
that exits with exit code above 0 if formatting was needed
How
Exit code EX_DATAERR (65) selected after consulting sysexits(3) Same flag and behavior as in prettier.
Tests on Windows 10
I had a failing test locally even before starting and was not able to resolve it.
- node --version = v8.6.0
- npm --version = 5.3.0
- OS = Windows 10
FAIL test\lua-5.3.4.test.ts
● Lua 5.3.4 standalone tests › strings.lua can still pass tests after being formatted
Error
Error: lua53: stdin:214: assertion failed!
stack traceback:
[C]: in function 'assert'
stdin:214: in main chunk
[C]: in ?
Ping @trixnz