Browse Source

run_clang_format_diff: mention homebrew for clang-format installation (#4237)

YAMAMOTO Takashi 8 months ago
parent
commit
382aa9e6c3
1 changed files with 13 additions and 3 deletions
  1. 13 3
      ci/coding_guidelines_check.py

+ 13 - 3
ci/coding_guidelines_check.py

@@ -98,9 +98,19 @@ def run_clang_format_diff(root: Path, commits: str) -> bool:
     code before committing the PR, or it might fail to pass the CI check:
 
     1. Install clang-format-14.0.0
-    Normally we can install it by `sudo apt-get install clang-format-14`,
-    or download the package from https://github.com/llvm/llvm-project/releases
-    and install it
+
+    You can download the package from
+    https://github.com/llvm/llvm-project/releases
+    and install it.
+
+    For Debian/Ubuntu, we can probably use
+    `sudo apt-get install clang-format-14`.
+
+    Homebrew has it as a part of llvm@14.
+    ```shell
+    brew install llvm@14
+    /usr/local/opt/llvm@14/bin/clang-format
+    ```
 
     2. Format the C/C++ source file
     ``` shell