Add a lint command to the Makefile

for now, it just checks formatting
This commit is contained in:
travisladuke
2023-07-27 14:07:48 -07:00
parent 3121a72c53
commit 56133bb8d2
2 changed files with 12 additions and 0 deletions
+9
View File
@@ -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]
+3
View File
@@ -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