From 16c5c33a858a7e05e5068901176aa6f61298cb2a Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:51:17 +0200 Subject: [PATCH] Clang suggest (#678) * add clang suggestion * Update clang-format-suggest.yml * Update clang-format-suggest.yml * simplify * switch to ubuntu * Update clang-format-suggest.yml * update ubuntu --------- Co-authored-by: MegaMech --- .github/workflows/clang-format-suggest.yml | 17 +++++++++++++++++ .github/workflows/clang-format.yml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/clang-format-suggest.yml diff --git a/.github/workflows/clang-format-suggest.yml b/.github/workflows/clang-format-suggest.yml new file mode 100644 index 0000000000..03759fffbb --- /dev/null +++ b/.github/workflows/clang-format-suggest.yml @@ -0,0 +1,17 @@ +name: clang-format Suggest +on: [pull_request] +jobs: + formatting-check: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: Install Dependance + run: | + sudo apt install clang-format make + - name: Run clang-format style check for C/C++/Protobuf programs. + run: | + clang-format --version + python tools/format.py + - uses: parkerbxyz/suggest-changes@v1 + with: + comment: 'Please commit the suggested changes from clang-format.' diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index dacf8caf77..5719152cfc 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -1,5 +1,5 @@ name: clang-format Check -on: [push, pull_request] +on: [push] jobs: formatting-check: name: Formatting Check