mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-17 01:54:38 -06:00
chore: display line numbers in output of check-env-var-annotations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user