From 9cc44fd7f154b1e834f78f942dbcc55153fc1d96 Mon Sep 17 00:00:00 2001 From: "Inseon Yu(Merlyn)" Date: Fri, 6 Oct 2023 10:34:45 +0900 Subject: [PATCH] ci: add cpplint --- .github/workflows/ci.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62dc8d3d2d..bf5a1bb9b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,11 +40,25 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: DoozyX/clang-format-lint-action@v0.15 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Python for cpplint + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install cpplint + run: pip install cpplint + + - name: Run cpplint + run: find . -iname "*.h" -o -iname "*.cc" | grep -v -e "^./tachyon/base/" -e "^./tachyon/device/" | xargs cpplint --filter=-legal/copyright,-whitespace/line_length,-build/namespaces,-runtime/references + + - name: Run clang-format lint + uses: DoozyX/clang-format-lint-action@v0.15 with: - source: '.' - exclude: './lib' - extensions: 'h,cc' + source: "." + exclude: "./lib" + extensions: "h,cc" clangFormatVersion: 15 inplace: True