mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 02:13:35 +08:00
Work on format testing.
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
echo pwd:$PWD
|
||||
format=$1
|
||||
format_wildcards="""
|
||||
./matrix/*.*pp
|
||||
./test/*.*pp
|
||||
"""
|
||||
|
||||
if [[ $format ]]
|
||||
then
|
||||
echo formatting
|
||||
astyle ${format_wildcards}
|
||||
else
|
||||
echo checking format
|
||||
astyle --dry-run ${format_wildcards} | grep Formatted
|
||||
if [[ $? -eq 0 ]]
|
||||
then
|
||||
echo need to format
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user