diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71a2d9a500..ec0d7f1c5c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -270,6 +270,19 @@ jobs: with: name: ${{ matrix.artifact_name }} path: ${{ matrix.artifact_filename }} + - name: Lint + if: matrix.configuration == 'Debug' && matrix.arch == 'x86_64' + uses: cpp-linter/cpp-linter-action@8ae6cfaea8cc035c6155b5fe79d7991a9bf638af # v2.14.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + version: '18' # clang-format version + repo-root: ${{ github.workspace }}/src + style: file:${{ github.workspace }}/src/.clang-format + database: ${{ github.workspace }}/src/build/compile_commands.json + lines-changed-only: true + format-review: true + passive-reviews: true macOS: name: Build for macOS (${{ matrix.arch }}, ${{ matrix.configuration }}) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 20757708b5..0000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Lint - -on: - pull_request: - paths-ignore: - - '.github/**' - - '!.github/workflows/lint.yml' - - 'README.md' - - 'ubuntu-win64-cross/**' - -jobs: - Check: - name: Check formatting and lints - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - name: Clone tree - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - with: - fetch-depth: 0 - - name: Check formatting/lints - uses: cpp-linter/cpp-linter-action@832a609fe16e1c98ea764641f07dec5d39db5a56 # v2.13.4 - id: linter - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - version: '16' - style: file - lines-changed-only: true - format-review: true - - name: Report result - if: steps.linter.outputs.checks-failed > 0 - run: exit 1 -