From 1af1c3cf10e22446ccac9ad7773417787d0f4f6d Mon Sep 17 00:00:00 2001 From: Julien Cabieces Date: Mon, 8 Aug 2022 10:44:57 +0200 Subject: [PATCH] fix shellcheck --- scripts/cppcheck.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/cppcheck.sh b/scripts/cppcheck.sh index 71f5aaa39d9..22609b27c65 100755 --- a/scripts/cppcheck.sh +++ b/scripts/cppcheck.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash set -eu @@ -64,12 +64,12 @@ fi for category in "style" "performance" "portability"; do if grep "${category}," ${LOG_FILE} >/dev/null; then echo "INFO: Issues in '${category}' category found, but not considered as making script to fail:" - grep "${category}," ${LOG_FILE} | grep -v `printf -- "-e %s, " "${ERROR_CATEGORIES[@]}" ` + grep "${category}," ${LOG_FILE} | grep -v $(printf -- "-e %s, " "${ERROR_CATEGORIES[@]}") echo "" fi done -for category in "error" "warning" ${ERROR_CATEGORIES[@]}; do +for category in "error" "warning" "${ERROR_CATEGORIES[@]}"; do if test "${category}" != ""; then if grep "${category}," ${LOG_FILE} >/dev/null; then echo "ERROR: Issues in '${category}' category found:"