format-json: Improve usability
- report processed file
- process all files even if one is incorrect
- report errors with exit code
Yes, seems good idea. I was about to suggest to make a print function to be python 3 compatible, but this script is already not python3 compatible because files are opened in
bmode. I remember vaguely trying to make it compatible with both python2 and python3 and giving up when seeing that non-ascii characters were escaped as
python2explicitly here), but I understand today this is the normal behaviour, because
ensure_asciiis true by default in
json.dump. Anyway, this MR is good independently of the python3 story, we can make it compatible with python3 later.
Ok, I merge then, thanks.
mergedToggle commit list