Updated radio_thread for new radio packet (#29) #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Clang Format | |
| on: [push, pull_request] | |
| jobs: | |
| clang-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Which Clang-Format | |
| run: | | |
| which clang-format | |
| clang-format --version | |
| - name: Run clang-format check | |
| run: | | |
| echo "Checking C code style..." | |
| failed=0 | |
| files=$(find . -name '*.c' -o -name '*.h') | |
| for f in $files; do | |
| diff_output=$(diff -u "$f" <(clang-format -style=file "$f") || true) | |
| if [ -n "$diff_output" ]; then | |
| echo "Style issues in $f:" | |
| echo "$diff_output" | |
| failed=1 | |
| fi | |
| done | |
| if [ $failed -eq 1 ]; then | |
| echo "Some files do not match the style. Fix with clang-format." | |
| exit 1 | |
| else | |
| echo "Style check passed" | |
| fi |