forked from Archive/PX4-Autopilot
astyle: switch condition to empty string check
Thanks to @bkueang 's review comment I switched to an explicit check for an empty sting instead of a condition that could be theoretically true in other cases and is less readable. Type "man test" on your terminal to read up what -n stands for.
This commit is contained in:
parent
ef7e885644
commit
2c56ceec93
|
@ -5,7 +5,7 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
|
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
CHECK_FAILED=$(${DIR}/fix_code_style.sh --dry-run --formatted $FILE)
|
CHECK_FAILED=$(${DIR}/fix_code_style.sh --dry-run --formatted $FILE)
|
||||||
if [[ $CHECK_FAILED ]]; then
|
if [ -n "$CHECK_FAILED" ]; then
|
||||||
${DIR}/fix_code_style.sh --quiet < $FILE > $FILE.pretty
|
${DIR}/fix_code_style.sh --quiet < $FILE > $FILE.pretty
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue