diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..5fb2d3abdd0 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,36 @@ +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@v3 + with: + fetch-depth: 0 + - name: Check formatting/lints + uses: cpp-linter/cpp-linter-action@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 +