From b1e9ab92c30c609473d323bf1102a862d2733373 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 16 Feb 2024 12:12:23 +0545 Subject: [PATCH] chore: display line numbers in output of check-env-var-annotations --- .make/check-env-var-annotations.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.make/check-env-var-annotations.sh b/.make/check-env-var-annotations.sh index 0f1beb652..e1be90082 100755 --- a/.make/check-env-var-annotations.sh +++ b/.make/check-env-var-annotations.sh @@ -24,7 +24,7 @@ ERROR=0 SEMVER_REGEX="([0-9]|[1-9][0-9]*)(\.([0-9]|[1-9][0-9]*)){1,2}(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?" -QUERY_INTRO=$(git grep "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\.0))\""|grep -v "_test.go"|grep -v "vendor/") +QUERY_INTRO=$(git grep -n "env:" -- '*.go' |grep -v -P "introductionVersion:\"($SEMVER_REGEX|(pre5\.0))\""|grep -v "_test.go"|grep -v "vendor/") RESULTS_INTRO=$(echo "${QUERY_INTRO}"|wc -l) if [ "${RESULTS_INTRO}" -gt 0 ]; then @@ -38,7 +38,7 @@ fi # The following grep will filter out every line containing an `env` annotation # it will ignore every line that has allready a valid `desc` annotation -QUERY_DESC=$(git grep "env:" -- '*.go' |grep -v -P "desc:\".{10,}\""|grep -v "_test.go"|grep -v "vendor/") +QUERY_DESC=$(git grep -n "env:" -- '*.go' |grep -v -P "desc:\".{10,}\""|grep -v "_test.go"|grep -v "vendor/") RESULTS_DESC=$(echo "${QUERY_DESC}"|wc -l) if [ "${RESULTS_DESC}" -gt 0 ]; then