From a63fa51a150bc24b668d391c38044d9441412443 Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Wed, 6 Apr 2022 14:18:36 -0700 Subject: [PATCH] Create cpp-linter.yml (#7208) * Create cpp-linter.yml * Update cpp-linter.yml * Update cpp-linter.yml * Update bfbs_gen_lua.cpp make some ill-formed edits to see if the linter flags them. * Update cpp-linter.yml Configured tidy checks * Update cpp-linter.yml Build project before linting to get compile_commands.json * Update cpp-linter.yml * Update cpp-linter.yml * Update cpp-linter.yml * Update cpp-linter.yml * Update cpp-linter.yml * lines only --- .github/workflows/cpp-linter.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cpp-linter.yml diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml new file mode 100644 index 000000000..88fbd6b7c --- /dev/null +++ b/.github/workflows/cpp-linter.yml @@ -0,0 +1,35 @@ +name: cpp-linter +permissions: read-all + +on: + pull_request: + branches: + - master + paths-ignore: "tests/**" + +jobs: + cpp-linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: shenxianpeng/cpp-linter-action@master + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + version: 12 + style: file + lines-changed-only: true + tidy-checks: >- + bugprone-*, + performance-*, + readability-*, + portability-*, + modernize-*, + clang-analyzer-*, + cppcoreguidelines-*, + -modernize-use-trailing-return-type + + - name: Check Result + if: steps.linter.outputs.checks-failed > 0 + run: exit 1