[llvm] code-format: Improve the code-format-helper to be able to run as a git hook (PR #73957)
Louis Dionne via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 06:30:24 PST 2023
================
@@ -14,8 +14,22 @@
import sys
from functools import cached_property
-import github
-from github import IssueComment, PullRequest
+
----------------
ldionne wrote:
Can some documentation be added somewhere explaining what this script does and in particular what it can be used as a pre-commit hook (and how to install it)? Since we expect a lot of people to start installing this as a hook, it makes sense to properly document this script. I'm not saying the details of how it gets called in the pre-commit CI and whatnot, but at least
- it runs both `clang-format` and `darker`
- it is the canonical way of formatting stuff in LLVM
- it can be installed as a pre-commit hook (and how)
- what "customization points" exist (e.g. the environment variables to pick up Darker and clang-format)
https://github.com/llvm/llvm-project/pull/73957
More information about the llvm-commits
mailing list