Skip to content

test clang-format action 2 #4

test clang-format action 2

test clang-format action 2 #4

Workflow file for this run

name: "Check Clang Format"
on: [push, pull_request]
jobs:
clang-format:
name: "Clang Formatter"
runs-on: ubuntu-latest
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v3
with:
persist-credentials: false
submodules: recursive
- name: Paths filter
uses: dorny/paths-filter@master
id: filter
with:
filters: |
file_changed:
- "**/*.cpp"
- "**/*.c"
- "**/*.h"
- "**/*.hpp"
- "**/*.cxx"
- name: "Format it!"
if: ${{ steps.filter.outputs.file_changed == 'true' }}
uses: DoozyX/clang-format-lint-action@master
id: check_format
with:
source: "./"
clangFormatVersion: 14
inplace: False
style: "file"
- name: Ignore it!
if: ${{ steps.filter.outputs.be_changes == 'false' }}
run: echo 'No need to check.'