Skip to content

Commit

Permalink
astyle: switch condition to empty string check
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MaEtUgR authored and bkueng committed May 9, 2018
1 parent ef7e885 commit 2c56cee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tools/astyle/check_code_style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

if [ -f "$FILE" ]; then
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

echo
Expand Down

0 comments on commit 2c56cee

Please sign in to comment.