Check: improve verbosity of url verifier (#260)

* Check: improve verbosity of url verifier

* Fix Renesas url

* Fix Renesas url

* URL add Renesas full url

* Fix more Renesas URLs

* Fix Renesas url in IAR directory

* Testing new curl command for url checks

* Fix url_checker

* Fix url_verifier

* Revert Renesas url changes

* add txt to the ignored header checker extentions
This commit is contained in:
alfred gedeon 2021-02-10 16:04:08 -08:00 committed by GitHub
parent 21b1058bf7
commit a4b2e0c3f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -8,6 +8,7 @@ then
exit 2
fi
USER_AGENT="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36"
SCRIPT_RET=0
set -o nounset # Treat unset variables as an error
@ -27,7 +28,7 @@ function test {
for UNIQ_URL in ${!dict[@]} # loop urls
do
CURL_RES=$(curl -I ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
CURL_RES=$(curl -si --user-agent "$(USER_AGENT)" ${UNIQ_URL} 2>/dev/null| head -n 1 | cut -f 2 -d ' ')
RES=$?
if [ "${CURL_RES}" == '' -o "${CURL_RES}" != '200' ]
@ -38,11 +39,14 @@ function test {
then
CURL_RES=$RES
SCRIPT_RET=1
echo ERROR: Result is: "${CURL_RES}"
elif [ "${CURL_RES}" == '403' ]
then
SCRIPT_RET=1
echo ERROR: Result is: "${CURL_RES}"
else
echo WARNING: Result is: "${CURL_RES}"
fi
echo Result is: "${CURL_RES}"
echo "================================="
fi
done

View File

@ -30,7 +30,8 @@ KERNEL_IGNORED_EXTENSIONS = [
'.tex',
'.png',
'.bat',
'.sh'
'.sh',
'.txt'
]
KERNEL_IGNORED_PATTERNS = [