From 99d276d9ce1c45fbff97d2299811c7213c04faea Mon Sep 17 00:00:00 2001 From: Denis Costa Date: Thu, 4 Jan 2024 11:11:07 -0300 Subject: [PATCH] Move cmd to run on workflow --- .github/workflows/lint.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 024883bd..07e3de8e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -25,6 +25,18 @@ jobs: with: image: c-lint:latest options: -v ${{ github.workspace }}:/code -e LINT_FIX=0 - run: | - ls - pwd + run: echo "c"; if [ "$LINT_FIX" = 1 ]; then \ + clang-format \ + --style=file \ + -i \ + $(find . -name '*.c'); \ + else \ + cpplint \ + --quiet \ + --recursive \ + --extensions=c \ + --filter="-legal/copyright,-runtime/arrays,-readability/casting" . && \ + scripts/run-clang-format.py \ + --clang-format-executable=clang-format \ + -r .; \ + fi