Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
21e4116
[CI] Add uncrustify script and action
Jun 21, 2025
4f22265
[CI] Fix uncrustify install
Jun 21, 2025
e975b2a
[LR11x0] Chore: fixup firmware images
jgromes Jul 7, 2025
d2c876a
[CI] Force uncrustify 0.78.1
jgromes Jul 13, 2025
c14ef00
[HAL] Chore: uncrustify formatting
jgromes Jul 19, 2025
203ff5f
[MOD] Chore: uncrustify formatting
jgromes Jul 19, 2025
09792bf
[CC1101] Chore: uncrustify formatting
jgromes Jul 19, 2025
393fd8b
[LLCC68] Chore: uncrustify formatting
jgromes Jul 19, 2025
e1c7f51
[LR11x0] Chore: uncrustify formatting
jgromes Jul 19, 2025
40e4de8
[nRF24] Chore: uncrustify formatting
jgromes Jul 19, 2025
70137f8
[RF69] Chore: uncrustify formatting
jgromes Jul 19, 2025
3f3f794
[Si443x] Chore: uncrustify formatting
jgromes Jul 19, 2025
dbe87cc
[SX123x] Chore: uncrustify formatting
jgromes Jul 19, 2025
5cad16a
[SX126x] Chore: uncrustify formatting
jgromes Jul 19, 2025
f96e6b3
[SX127x] Chore: uncrustify formatting
jgromes Jul 19, 2025
fa57770
[SX128x] Chore: uncrustify formatting
jgromes Jul 19, 2025
c4babb6
[AFSK] Chore: uncrustify formatting
jgromes Jul 19, 2025
d471f76
[APRS] Chore: uncrustify formatting
jgromes Jul 19, 2025
c927127
[AX25] Chore: uncrustify formatting
jgromes Jul 19, 2025
e42cb80
[Bell] Chore: uncrustify formatting
jgromes Jul 19, 2025
2dddf71
[EXT] Chore: uncrustify formatting
jgromes Jul 19, 2025
2765e1f
[FSK4] Chore: uncrustify formatting
jgromes Jul 19, 2025
53f438b
[Hell] Chore: uncrustify formatting
jgromes Jul 19, 2025
e0c10a4
[LoRaWAN] Chore: uncrustify formatting
jgromes Jul 19, 2025
08f2807
[Morse] Chore: uncrustify formatting
jgromes Jul 19, 2025
9d51410
[Pager] Chore: uncrustify formatting
jgromes Jul 19, 2025
b2963ef
[PHY] Chore: uncrustify formatting
jgromes Jul 19, 2025
45cc32b
[Print] Chore: uncrustify formatting
jgromes Jul 19, 2025
f1db249
[RTTY] Chore: uncrustify formatting
jgromes Jul 19, 2025
496815e
[SSTV] Chore: uncrustify formatting
jgromes Jul 19, 2025
bb6b89d
[Utils] Chore: uncrustify formatting
jgromes Jul 19, 2025
6fbe3d7
[CI] Update uncrustify config
jgromes Jul 19, 2025
f9f1a5d
[CI] Build uncrustify from source
jgromes Jul 19, 2025
5374507
Merge branch 'master' into uncrustify
jgromes Jul 19, 2025
9024ae1
Chore: apply formatting changes after merge
jgromes Jul 19, 2025
d176c6e
Merge branch 'master' into uncrustify
jgromes Jul 19, 2025
cda7d5d
[HAL] Apply changes after merge
jgromes Jul 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/uncrustify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Uncrustify"

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
check:
name: Run format check using uncrustify
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uncrustify
run: |
sudo apt-get update
sudo apt-get install -y uncrustify

- name: Run uncrustify
run: ./extras/uncrustify/uncrustify.sh

- name: Upload patch file as artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: uncrustify.patch
path: extras/uncrustify/uncrustify.patch
if-no-files-found: ignore
1 change: 1 addition & 0 deletions extras/uncrustify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uncrustify.patch
10 changes: 5 additions & 5 deletions uncrustify.cfg → extras/uncrustify/uncrustify.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ sp_before_ptr_star = remove # ignore/add/remove/force/not_defined

# Add or remove space before pointer star '*' that isn't followed by a
# variable name. If set to ignore, sp_before_ptr_star is used instead.
sp_before_unnamed_ptr_star = force # ignore/add/remove/force/not_defined
sp_before_unnamed_ptr_star = remove # ignore/add/remove/force/not_defined

# Add or remove space between pointer stars '*', as in 'int ***a;'.
sp_between_ptr_star = remove # ignore/add/remove/force/not_defined
Expand Down Expand Up @@ -249,7 +249,7 @@ sp_before_unnamed_byref = ignore # ignore/add/remove/force/not_defined
# Add or remove space after reference sign '&', if followed by a word.
#
# Overrides sp_type_func.
sp_after_byref = force # ignore/add/remove/force/not_defined
sp_after_byref = remove # ignore/add/remove/force/not_defined

# Add or remove space after a reference sign '&', if followed by a function
# prototype or function definition.
Expand Down Expand Up @@ -2609,15 +2609,15 @@ align_var_def_span = 0 # unsigned number
# 1: Part of the variable 'void *foo;'
# 2: Dangling 'void *foo;'
# Dangling: the '*' will not be taken into account when aligning.
align_var_def_star_style = 0 # unsigned number
align_var_def_star_style = 1 # unsigned number

# How to consider (or treat) the '&' in the alignment of variable definitions.
#
# 0: Part of the type 'long & foo;' (default)
# 1: Part of the variable 'long &foo;'
# 2: Dangling 'long &foo;'
# Dangling: the '&' will not be taken into account when aligning.
align_var_def_amp_style = 0 # unsigned number
align_var_def_amp_style = 1 # unsigned number

# The threshold for aligning variable definitions.
# Use a negative number for absolute thresholds.
Expand Down Expand Up @@ -2745,7 +2745,7 @@ align_typedef_func = 0 # unsigned number
# 1: Part of type name: 'typedef int *pint;'
# 2: Dangling: 'typedef int *pint;'
# Dangling: the '*' will not be taken into account when aligning.
align_typedef_star_style = 0 # unsigned number
align_typedef_star_style = 1 # unsigned number

# How to consider (or treat) the '&' in the alignment of typedefs.
#
Expand Down
24 changes: 24 additions & 0 deletions extras/uncrustify/uncrustify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /bin/bash

script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
out_file=$script_dir/uncrustify.patch
rm $out_file

# for all soruce files, run uncrustify and save the output to a patch file
for file in $(find src/ -name '*.cpp' -or -name '*.h'); do
uncrustify -c $script_dir/uncrustify.cfg -f $file -o $file.uncrustify
diff -u $file $file.uncrustify >> $out_file
rm $file.uncrustify
done

cat $out_file

if [ -s $out_file ]; then
echo "Uncrustify finished and found some issues"
echo "Apply the patch file by: 'cd src && git apply $out_file'"
exit 1
else
echo "Uncrustify finished - all OK!"
exit 0
fi

Loading