diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 019e856..781a285 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,16 @@ on: - "README.md" jobs: + lint: + name: Run lint checks + runs-on: [ ubuntu-latest ] + steps: + - name: Lint + uses: actions/checkout@v3.5.3 + - run: make lint + build_matrix: + needs: lint strategy: matrix: os: [ubuntu-latest, macos-latest] diff --git a/makefile b/makefile index 0930594..8a4c4d7 100644 --- a/makefile +++ b/makefile @@ -19,5 +19,8 @@ clean: rm -rf pylon pylon-* rm -f *.o tcp-proxy *.dSYM +lint: + clang-format -i pylon.cpp -style file --dry-run --Werror || (echo "\nPlease run make fmt and resubmit\n" && exit 1) + fmt: clang-format -i pylon.cpp -style file