diff --git a/.clang-tidy b/.clang-tidy index 6036e6cd52..e350240138 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -20,7 +20,6 @@ CheckOptions: [] Checks: 'abseil-*,boost-*,bugprone-*,cert-*,clang-analyzer-*,concurrency-*,cppcoreguidelines-*,darwin-*,fuchsia-*,google-*,hicpp-*,linuxkernel-*,llvm-*,llvmlibc-*,misc-*,modernize-*,performance-*,portability-*,readability-*' ExtraArgs: - - -std=c++17 ExtraArgsBefore: [] FormatStyle: none HeaderFilterRegex: '' diff --git a/.github/workflows/lint_and_test_cpp.yaml b/.github/workflows/lint_and_test_cpp.yaml index f382f3e825..37167f83a1 100644 --- a/.github/workflows/lint_and_test_cpp.yaml +++ b/.github/workflows/lint_and_test_cpp.yaml @@ -62,20 +62,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: cpp-linter/cpp-linter-action@v2 - id: linter - continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - style: '' # Disabled. Use .clang-format config file if specify 'file'. - tidy-checks: '' # Use .clang-tidy config file - files-changed-only: false - thread-comments: false - extra-args: '-std=c++17 -Wall' - - name: Fail fast?! - if: steps.linter.outputs.clang-tidy-checks-failed > 0 - run: exit 1 + - name: clang-tidy + run: ./build-support/clang_tidy.py --rev-range ${{ env.GITHUB_SHA }} iwyu: name: IWYU diff --git a/build-support/clang_tidy.py b/build-support/clang_tidy.py index 0254a86a85..20b9515b20 100755 --- a/build-support/clang_tidy.py +++ b/build-support/clang_tidy.py @@ -98,3 +98,4 @@ def split_warnings(clang_output): clang_output = run_tidy(args.rev, args.rev_range) print("Clang output") print(clang_output) + sys.exit(None == re.match("warning: |error: ", clang_output, flags=0))