chore: enable linting of shell scripts (#11031)
This commit is contained in:
parent
51facf751b
commit
3518577992
|
|
@ -48,7 +48,7 @@ jobs:
|
||||||
# Run Linter against code base #
|
# Run Linter against code base #
|
||||||
################################
|
################################
|
||||||
- name: Lint Code Base
|
- name: Lint Code Base
|
||||||
uses: github/super-linter@v4.8.1
|
uses: github/super-linter@v4.9.2
|
||||||
env:
|
env:
|
||||||
VALIDATE_ALL_CODEBASE: false
|
VALIDATE_ALL_CODEBASE: false
|
||||||
DEFAULT_BRANCH: master
|
DEFAULT_BRANCH: master
|
||||||
|
|
@ -56,3 +56,4 @@ jobs:
|
||||||
LINTER_RULES_PATH: '.'
|
LINTER_RULES_PATH: '.'
|
||||||
MARKDOWN_CONFIG_FILE: .markdownlint.yml
|
MARKDOWN_CONFIG_FILE: .markdownlint.yml
|
||||||
VALIDATE_MARKDOWN: true
|
VALIDATE_MARKDOWN: true
|
||||||
|
VALIDATE_BASH: true
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ fi
|
||||||
#compare dotted versions
|
#compare dotted versions
|
||||||
#see https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
|
#see https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
|
||||||
vercomp () {
|
vercomp () {
|
||||||
if [[ $1 == $2 ]]
|
if [[ $1 == "$2" ]]
|
||||||
then
|
then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
local IFS=.
|
local IFS=.
|
||||||
local i ver1=($1) ver2=($2)
|
local i ver1=("$1") ver2=("$2")
|
||||||
# fill empty fields in ver1 with zeros
|
# fill empty fields in ver1 with zeros
|
||||||
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
|
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
|
||||||
do
|
do
|
||||||
|
|
@ -68,7 +68,7 @@ fi
|
||||||
objdump -T "$prog" | # get the dynamic symbol table
|
objdump -T "$prog" | # get the dynamic symbol table
|
||||||
sed -n "s/.* GLIBC_\([0-9.]\+\).*/\1/p" | # find the entries for glibc and grab the version
|
sed -n "s/.* GLIBC_\([0-9.]\+\).*/\1/p" | # find the entries for glibc and grab the version
|
||||||
sort | uniq | # remove duplicates
|
sort | uniq | # remove duplicates
|
||||||
while read v; do
|
while read -r v; do
|
||||||
set +e
|
set +e
|
||||||
vercomp "$v" "$max" # fail if any version is newer than our max
|
vercomp "$v" "$max" # fail if any version is newer than our max
|
||||||
comp=$?
|
comp=$?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue