This makes it easier to process the clang-tidy output in other tools.
For far it's only parsing the findings, not the output on stderr.
For testing you can use:
bash ninja clangd COMMIT=4dedd82cc99341d757a9cc07a8b7b22c8bb61d19 git diff $COMMIT~ $COMMIT | python3 clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py -p1 -json -checks="*"
This is part of the effort towards re-enabling clang-tidy in
pre-merge testing. With JSON output, we can deprecate some local
code in pre-merge testing.