From 0c73c9d64308093e1f71d542fda07a4a603534dc Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Fri, 28 Jul 2023 19:22:03 -0400 Subject: [PATCH] ci: Add clang-format lint check --- .github/workflows/lint.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..0a6e412ec20 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,39 @@ +name: Lint + +on: + push: + paths-ignore: + - '.github/**' + - '!.github/workflows/build.yml' + - 'README.md' + - 'ubuntu-win64-cross/**' + pull_request: + paths-ignore: + - '.github/**' + - '!.github/workflows/build.yml' + - 'README.md' + - 'ubuntu-win64-cross/**' + +jobs: + Check: + name: Check formatting and lints + runs-on: ubuntu-latest + steps: + - name: Clone tree + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Check formatting/lints + uses: cpp-linter/cpp-linter-action@v2.6.0 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + version: '16' + style: file + lines-changed-only: true + thread-comments: true + - name: Report result + if: steps.linter.outputs.checks-failed > 0 + run: exit 1 +