[PATCH] D49116: Setup clang-format as an Arcanist linter
Siddhartha Bagaria via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 10 11:20:36 PDT 2018
starsid marked 2 inline comments as done.
starsid added inline comments.
================
Comment at: .arcanist/linters/clang-format.sh:12-13
+ NC='\033[0m' # No Color
+ echo -e "${RED}Please install clang-format-diff for arcanist to lint C/C++ source code.${NC}" >&2
+ exit 1
+fi
----------------
dberris wrote:
> What happens when the script exits with a non-zero value? Does it stop the upload/update of the patch? I suspect we don't really want to make that a hard requirement yet, unless we get agreement from llvm-dev that this is something we should enforce for all patches moving forward.
When the script exits with a non-zero value (which should only happen if clang-format-diff is not installed), the user's upload workflow is stopped, and the user is messaged saying that the linter failed.
I have now added a message saying that the user can skip linting by passing `--nolint` to `arc diff`. So it's not a hard requirement, but it is a little disruptive. I can make it silently fail by returning an exit code of 0 instead of 1, but I don't feel like it's a good idea.
Repository:
rL LLVM
https://reviews.llvm.org/D49116
More information about the llvm-commits
mailing list