mirror of
https://github.com/RfidResearchGroup/ChameleonUltra.git
synced 2026-05-12 11:22:59 -07:00
Compare commits
6
Commits
dev
...
clang-format
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6f37c80df | ||
|
|
07e7ed2abd | ||
|
|
3b0d14759b | ||
|
|
9248223a39 | ||
|
|
1e79e8bd43 | ||
|
|
e0790f677b |
@@ -0,0 +1,5 @@
|
|||||||
|
BreakBeforeBinaryOperators: All
|
||||||
|
ColumnLimit: 120
|
||||||
|
BasedOnStyle: Google
|
||||||
|
BreakBeforeBraces: Stroustrup
|
||||||
|
IndentWidth: 4
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
name: clang-format Check
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
paths:
|
||||||
|
- '**.c'
|
||||||
|
- '**.h'
|
||||||
|
- '**.cpp'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install clang-format
|
||||||
|
run: sudo apt install -y clang-format
|
||||||
|
|
||||||
|
- name: Get files and check format
|
||||||
|
run: |
|
||||||
|
exit_code=0
|
||||||
|
while IFS= read -r -d '' f; do
|
||||||
|
if ! diff -u "$f" <(clang-format "$f"); then
|
||||||
|
echo "Formatting issue in $f"
|
||||||
|
exit_code=1
|
||||||
|
fi
|
||||||
|
done < <(find . -type f \( -name '*.c' -o -name '*.h' \) ! -path './firmware/nrf52_sdk/*' ! -path './firmware/nrf52_sdk/**' -print0)
|
||||||
|
|
||||||
|
if [ $exit_code -ne 0 ]; then
|
||||||
|
echo "Clang-format check failed."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "All files are properly formatted."
|
||||||
|
fi
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
name: Lint (pyrefly + ruff)
|
name: Lint (pyrefly + ruff)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request_target:
|
||||||
paths:
|
paths:
|
||||||
- "software/**"
|
- "software/**"
|
||||||
- ".github/workflows/**"
|
- ".github/workflows/**"
|
||||||
|
- "**.py"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
|
||||||
|
|
||||||
## [unreleased][unreleased]
|
## [unreleased][unreleased]
|
||||||
|
- Added clang formatter (@GameTec-live)
|
||||||
- Fix for static nested key recovery (@jekkos)
|
- Fix for static nested key recovery (@jekkos)
|
||||||
|
|
||||||
## [v2.1.0][2025-09-02]
|
## [v2.1.0][2025-09-02]
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
# Make it a bit less prone to breaking
|
||||||
|
cd "$(dirname "$0")/.." || exit
|
||||||
|
|
||||||
|
while IFS= read -r -d '' f; do
|
||||||
|
clang-format --verbose -i "$f"
|
||||||
|
done < <(find . -type f \( -name '*.c' -o -name '*.h' \) ! -path './firmware/nrf52_sdk/*' ! -path './firmware/nrf52_sdk/**' -print0)
|
||||||
Reference in New Issue
Block a user