[PATCH] D117773: [clang-tidy] added JSON output to clang-tidy-diff.py

Christian Kühnel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 20 04:31:05 PST 2022


kuhnel created this revision.
Herald added subscribers: carlosgalvezp, usaxena95, kadircet, xazax.hun.
kuhnel requested review of this revision.
Herald added subscribers: cfe-commits, ilya-biryukov.
Herald added a project: clang-tools-extra.

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.

https://github.com/google/llvm-premerge-checks/issues/367


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117773

Files:
  clang-tools-extra/clang-tidy/tool/clang-tidy-diff.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117773.401597.patch
Type: text/x-patch
Size: 3751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220120/1106c754/attachment-0001.bin>


More information about the cfe-commits mailing list