From dcd7f6ed62382a2e4969a70c57d7ab5dbef66bde Mon Sep 17 00:00:00 2001 From: Joe George Date: Fri, 8 Mar 2024 09:50:20 -0500 Subject: [PATCH] Add cpplint workflow --- .github/workflows/ci.yml | 2 +- .github/workflows/cpplint.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cpplint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e7f6067de4..9ee58cc035b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: branches: ["main"] pull_request: # The branches below must be a subset of the branches above - branches: ["main"] + # branches: ["main"] # See https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value concurrency: diff --git a/.github/workflows/cpplint.yml b/.github/workflows/cpplint.yml new file mode 100644 index 00000000000..57fdc566abb --- /dev/null +++ b/.github/workflows/cpplint.yml @@ -0,0 +1,28 @@ +name: C++ lint and format + +on: + workflow_dispatch: + push: + branches: ["main"] + pull_request: + # The branches below must be a subset of the branches above + branches: ["main"] + +jobs: + cpp-lint: + name: Swift Lint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - uses: cpp-linter/cpp-linter-action@v2 + id: linter + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + style: "file" # Use .clang-format config file + tidy-checks: "-*" # disable clang-tidy checks. + # tidy-checks: "" # Use .clang-tidy config file + # only 'update' a single comment in a pull request's thread. + thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}