Setup clang-format as an Arcanist linter
authorSiddhartha Bagaria <sbagaria@grailbio.com>
Mon, 30 Mar 2020 18:20:58 +0000 (14:20 -0400)
committerScott Linder <Scott.Linder@amd.com>
Mon, 30 Mar 2020 19:02:33 +0000 (15:02 -0400)
commit3c371491a2d5023060391ff54b924bf1c7a0c41f
treee7eb6c4ee879ff220e2a413dbcf3cb621ac79116
parent0af6d27e2ee2aa7365449e0f3c0f4727357a9584
Setup clang-format as an Arcanist linter

Summary:
This uses clang-format-diff as a linter for Arcanist.

`arc lint` flow, also run as part of `arc diff` unless skipped with
`--nolint`, will now run the linter shell script on the changed files,
and prompt the user to accept the suggested changes.

Message when clang-format-diff is not installed:
{F6654094}

Example of the noise during code review when clang-format-diff is not installed:
https://reviews.llvm.org/differential/changeset/?ref=1115809

Prompt when clang-format-diff is installed and suggests edits:
{F6650223}

Reviewers: probinson, scott.linder

Reviewed By: scott.linder

Subscribers: scott.linder, MyDeveloperDay, JonasToth, danilaml, JDevlieghere, dberris, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D49116
.arclint [new file with mode: 0644]
utils/arcanist/clang-format.sh [new file with mode: 0755]