From db0f019a70c29acb86bd7180e7beec51c339e2ca Mon Sep 17 00:00:00 2001 From: Jonne Ransijn Date: Sat, 16 Nov 2024 14:48:55 +0100 Subject: [PATCH] Meta: Print failed pre-commit steps in bold This makes them easier to find, especially for colorblind people. --- Meta/lint-ci.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Meta/lint-ci.sh b/Meta/lint-ci.sh index cc1638ca3c7..e8e3e95adcc 100755 --- a/Meta/lint-ci.sh +++ b/Meta/lint-ci.sh @@ -5,7 +5,7 @@ set -e script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) cd "${script_path}/.." || exit 1 -RED='\033[0;31m' +BOLD_RED='\033[0;1;31m' GREEN='\033[0;32m' NC='\033[0m' # No Color @@ -27,7 +27,7 @@ for cmd in \ if "${cmd}" "$@"; then echo -e "[${GREEN}OK${NC}]: ${cmd}" else - echo -e "[${RED}FAIL${NC}]: ${cmd}" + echo -e "[${BOLD_RED}FAIL${NC}]: ${cmd}" ((FAILURES+=1)) fi done @@ -36,7 +36,7 @@ if [ -x ./Build/lagom/bin/IPCMagicLinter ]; then if { git ls-files '*.ipc' | xargs ./Build/lagom/bin/IPCMagicLinter; }; then echo -e "[${GREEN}OK${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)" else - echo -e "[${RED}FAIL${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)" + echo -e "[${BOLD_RED}FAIL${NC}]: IPCMagicLinter (in Meta/lint-ci.sh)" ((FAILURES+=1)) fi else @@ -46,14 +46,14 @@ fi if Meta/lint-clang-format.sh --overwrite-inplace "$@" && git diff --exit-code -- ':*.cpp' ':*.h' ':*.mm'; then echo -e "[${GREEN}OK${NC}]: Meta/lint-clang-format.sh" else - echo -e "[${RED}FAIL${NC}]: Meta/lint-clang-format.sh" + echo -e "[${BOLD_RED}FAIL${NC}]: Meta/lint-clang-format.sh" ((FAILURES+=1)) fi if Meta/lint-swift.sh "$@" && git diff --exit-code -- ':*.swift'; then echo -e "[${GREEN}OK${NC}]: Meta/lint-swift.sh" else - echo -e "[${RED}FAIL${NC}]: Meta/lint-swift.sh" + echo -e "[${BOLD_RED}FAIL${NC}]: Meta/lint-swift.sh" ((FAILURES+=1)) fi