mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
build(astyle): pin astyle 3.1 via astyle-py
Distros ship newer astyle versions (Ubuntu 26.04: 3.6) which are incompatible with our options and format differently, so make check_format failed out of the box and required manually installing an old .deb. astyle-py bundles astyle 3.1 as WebAssembly and installs via pip on any OS, giving byte-identical results to native 3.1. Native astyle 2.06-3.1 is still accepted as fallback, so existing setups and the current CI container keep working. Files are now formatted in batches on a temporary copy instead of one astyle call per file, which keeps make check_format fast despite the interpreter startup.
This commit is contained in:
1 parent
1d85a376f9
commit
3d820c5e80
9 files changed
+83
-67
No files matched your search
@@ -54,7 +54,7 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# Check for code style, only in changed files
|
||||
bash -c "comm -12 <(./Tools/astyle/files_to_check_code_style.sh | sort) <(git diff --cached --name-only --diff-filter=ACM) | xargs -P 8 -I % ./Tools/astyle/check_code_style.sh %"
|
||||
bash -c "comm -12 <(./Tools/astyle/files_to_check_code_style.sh | sort) <(git diff --cached --name-only --diff-filter=ACM) | xargs ./Tools/astyle/check_code_style.sh"
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Pre-commit style error: Bad formatting according to astyle rules"
|
||||
|
||||
Reference in new issue
Block a user