Add spaces in show_finding()

When I view testssl.sh in KDE's text editor (kate), the code after "INFO" line in `show_finding()` isn't highlighted correctly, and the highlighting doesn't correct again until `pr_liteblueln()`. This PR fixes the highlighting issue by adding spaces between "]]" and ")". To be "safe," I also added spaces between "(" and "[[", and similarly added spaces in `is_json_format()`.
This commit is contained in:
David Cooper 2017-03-06 14:37:52 -05:00 committed by GitHub
parent 27aa25711d
commit f02948e24a
1 changed files with 9 additions and 9 deletions

View File

@ -297,14 +297,14 @@ set_severity_level() {
show_finding() { show_finding() {
local severity=$1 local severity=$1
([[ "$severity" == "DEBUG" ]]) || ( [[ "$severity" == "DEBUG" ]] ) ||
([[ "$severity" == "WARN" ]]) || ( [[ "$severity" == "WARN" ]] ) ||
([[ "$severity" == "INFO" ]] && [[ $SEVERITY_LEVEL -le $INFO ]]) || ( [[ "$severity" == "INFO" ]] && [[ $SEVERITY_LEVEL -le $INFO ]] ) ||
([[ "$severity" == "OK" ]] && [[ $SEVERITY_LEVEL -le $OK ]]) || ( [[ "$severity" == "OK" ]] && [[ $SEVERITY_LEVEL -le $OK ]] ) ||
([[ "$severity" == "LOW" ]] && [[ $SEVERITY_LEVEL -le $LOW ]]) || ( [[ "$severity" == "LOW" ]] && [[ $SEVERITY_LEVEL -le $LOW ]] ) ||
([[ "$severity" == "MEDIUM" ]] && [[ $SEVERITY_LEVEL -le $MEDIUM ]]) || ( [[ "$severity" == "MEDIUM" ]] && [[ $SEVERITY_LEVEL -le $MEDIUM ]] ) ||
([[ "$severity" == "HIGH" ]] && [[ $SEVERITY_LEVEL -le $HIGH ]]) || ( [[ "$severity" == "HIGH" ]] && [[ $SEVERITY_LEVEL -le $HIGH ]] ) ||
([[ "$severity" == "CRITICAL" ]] && [[ $SEVERITY_LEVEL -le $CRITICAL ]]) ( [[ "$severity" == "CRITICAL" ]] && [[ $SEVERITY_LEVEL -le $CRITICAL ]] )
} }
@ -838,7 +838,7 @@ fileout_json_finding() {
} }
is_json_format() { is_json_format() {
([[ -f "$JSONFILE" ]] && ("$do_json" || "$do_pretty_json")) ( [[ -f "$JSONFILE" ]] && ("$do_json" || "$do_pretty_json") )
} }
################# JSON FILE FORMATING END #################### ################# JSON FILE FORMATING END ####################