From 71c76a666f52a336bcd3682752c02a5e12765b98 Mon Sep 17 00:00:00 2001 From: GOB Date: Fri, 23 Aug 2024 02:35:31 +0900 Subject: [PATCH] Some tweaks --- .github/workflows/clang-format-check.yml | 37 ++++++++++++++++-------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml index 3b52f7d..639cd24 100644 --- a/.github/workflows/clang-format-check.yml +++ b/.github/workflows/clang-format-check.yml @@ -12,7 +12,15 @@ on: - '**.h' - '**.c' - '**.inl' + - '**clang-format-check.yml' pull_request: + - '**.ino' + - '**.cpp' + - '**.hpp' + - '**.h' + - '**.c' + - '**.inl' + - '**clang-format-check.yml' jobs: formatting-check: @@ -23,16 +31,21 @@ jobs: path: #- check: './' # path to include # exclude: '' # path to exclude - - check: 'src' - # exclude: '(Fonts)' # Exclude file paths containing "Fonts" - # - check: 'examples' - # exclude: '' + - check: 'src' + - check: 'test' + - check: 'examples' + # exclude: '(Fonts)' # Exclude file paths containing "Fonts" + steps: - - uses: actions/checkout@v3.1.0 - - name: Run clang-format style check for C/C++/Protobuf programs. - uses: jidicula/clang-format-action@v4.11.0 - with: - clang-format-version: '13' - check-path: ${{ matrix.path['check'] }} - exclude-regex: ${{ matrix.path['exclude'] }} - include-regex: ${{ env.INCLUDE_REGEX }} + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Run clang-format style check for C/C++/Protobuf programs. + uses: jidicula/clang-format-action@v4.10.2 # Using include-regex 10.x or later + with: + clang-format-version: '13' + check-path: ${{ matrix.path['check'] }} + exclude-regex: ${{ matrix.path['exclude'] }} + include-regex: ${{ env.INCLUDE_REGEX }}