diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-11-07 11:21:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-07 11:21:04 +0000 |
commit | 57b10aef62e8759afc413df8882fcd4fb5f098bf (patch) | |
tree | 220e0ec6be95a9b5cfe9bf03c118cc59c107b117 | |
parent | 57c31311b33e0575adb2c7465f8fa2869e40dbce (diff) | |
parent | c936060b86008f261c86d983befeb0574fd3e8fc (diff) | |
download | gcc-57b10aef62e8759afc413df8882fcd4fb5f098bf.zip gcc-57b10aef62e8759afc413df8882fcd4fb5f098bf.tar.gz gcc-57b10aef62e8759afc413df8882fcd4fb5f098bf.tar.bz2 |
Merge #795
795: Running `clang-format` locally [#242] r=philberty a=tschwinge
Apparently everyone but me knows how to do that; I'm now documenting it for my
own future use.
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
-rw-r--r-- | .github/workflows/clang-format.yml | 1 | ||||
-rw-r--r-- | CONTRIBUTING.md | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index d37247c..e1c81ad 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest steps: + # If updating these steps, please also correspondingly update '../../CONTRIBUTING.md', "Running `clang-format` locally". - uses: actions/checkout@v2 - name: Copy .clang-format file run: cp contrib/clang-format .clang-format diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 360c0e2..8a4ee59 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,15 @@ These will be imported into a GitHub PR to follow the normal review process, and * Where possible please add test cases to `gcc/testsuite/rust/` for all PRs. Some issues may not be testable via dejagnu/automation such as debug dump changes. -* PR's cannot be merged untill clang format and the build and tests pass. +* PRs won't be merged until `clang-format` and the build and tests pass. + +** Running `clang-format` locally + +... corresponding to what the _Clang Format Lint_ (`.github/workflows/clang-format.yml`) is doing, with `clang-format-10` being available locally, and avoiding the Docker overhead. + + $ wget 'https://github.com/DoozyX/clang-format-lint-action/raw/v0.11/run-clang-format.py' + $ cp contrib/clang-format .clang-format + $ python3 run-clang-format.py --clang-format-executable clang-format-10 --recursive --extensions h,cc gcc/rust/ * Please take the time to create good git commit messages see the existing format of them in the git log or refer to something like: https://chris.beams.io/posts/git-commit/ |