From 19c78f583adc952696c6b8ac4282f5920be0a5f6 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 17 Apr 2016 16:17:07 -0400 Subject: [PATCH] make check_format check version -run Tools/fix_code_style.sh with no argument to check astyle version --- Makefile | 3 ++- Tools/fix_code_style.sh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 532a825a5a..ac1c5568f8 100644 --- a/Makefile +++ b/Makefile @@ -203,9 +203,10 @@ run_sitl_ros: sitl_deprecation # -------------------------------------------------------------------- uavcan_firmware: - @(rm -rf vectorcontrol && git clone https://github.com/thiemar/vectorcontrol && cd vectorcontrol && BOARD=s2740vc_1_0 make --no-print-directory -s && BOARD=px4esc_1_6 make --no-print-directory -s && ../Tools/uavcan_copy.sh) + @(rm -rf vectorcontrol && git clone -q https://github.com/thiemar/vectorcontrol && cd vectorcontrol && BOARD=s2740vc_1_0 make --silent --no-print-directory && BOARD=px4esc_1_6 make --silent --no-print-directory && ../Tools/uavcan_copy.sh) check_format: + @./Tools/fix_code_style.sh @./Tools/check_code_style.sh check: px4fmu-v1_default px4fmu-v2_default px4fmu-v4_default mindpx-v2_default px4-stm32f4discovery_default check_format tests diff --git a/Tools/fix_code_style.sh b/Tools/fix_code_style.sh index d8b424ae56..3b3f7556f8 100755 --- a/Tools/fix_code_style.sh +++ b/Tools/fix_code_style.sh @@ -9,6 +9,10 @@ if [ "$ASTYLE_VER" != "$ASTYLE_VER_REQUIRED" ]; then exit 1 fi +if [[ $# -eq 0 ]] ; then + exit 0 +fi + DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) astyle \ --options=$DIR/astylerc \