mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
linting
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
2466ab4826
commit
ca4ef8fa57
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
bldred='\033[1;31m' # Bold Red
|
bldred='\033[1;31m' # Bold Red
|
||||||
bldgrn='\033[1;32m' # Bold Green
|
bldgrn='\033[1;32m' # Bold Green
|
||||||
|
@ -133,7 +133,7 @@ starttestjson() {
|
||||||
log_to_json() {
|
log_to_json() {
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
printf "\"result\": \"%s\"" "$1" | tee -a "$logger.json" 2>/dev/null 1>&2
|
printf "\"result\": \"%s\"" "$1" | tee -a "$logger.json" 2>/dev/null 1>&2
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
if [ $# -eq 2 ] && [ $# -ne 1 ]; then
|
if [ $# -eq 2 ] && [ $# -ne 1 ]; then
|
||||||
# Result also contains details
|
# Result also contains details
|
||||||
|
@ -143,7 +143,7 @@ log_to_json() {
|
||||||
# Result also includes details and a list of items. Add that directly to details and to an array property "items"
|
# Result also includes details and a list of items. Add that directly to details and to an array property "items"
|
||||||
# Also limit the number of items to $limit, if $limit is non-zero
|
# Also limit the number of items to $limit, if $limit is non-zero
|
||||||
truncItems=$3
|
truncItems=$3
|
||||||
if [ $limit != 0 ]; then
|
if [ "$limit" != 0 ]; then
|
||||||
truncItems=""
|
truncItems=""
|
||||||
ITEM_COUNT=0
|
ITEM_COUNT=0
|
||||||
for item in $3; do
|
for item in $3; do
|
||||||
|
|
Loading…
Reference in a new issue