Skip to content

Commit

Permalink
Add Complexity and formatting checks (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mtalat committed Mar 1, 2022
1 parent d45dc1e commit 3df2efa
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,34 @@ jobs:
-DBUILD_CLONE_SUBMODULES=ON \
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -Werror -DNDEBUG'
make -C build/ all
complexity:
runs-on: ubuntu-latest
container:
image: ghcr.io/1nce-gmbh/1nce-iot-c-sdk:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_KEY }}

steps:
- uses: actions/checkout@v2
- name: Check complexity
run: find source/ -iname '*.c' |
xargs complexity --scores --threshold=0 --horrid-threshold=8


formatting:
runs-on: ubuntu-latest
container:
image: ghcr.io/1nce-gmbh/1nce-iot-c-sdk:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_KEY }}

steps:
- uses: actions/checkout@v2
- name: Check formatting
run: cd source && find . -iname "*.[hc]" -type f -exec uncrustify --check -c ../tools/uncrustify.cfg -l C {} +



Expand Down

0 comments on commit 3df2efa

Please sign in to comment.