mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[ci] Run shellcheck as part of code_layout build
This commit is contained in:
parent
481461dea0
commit
7d938e8b94
@ -6,6 +6,7 @@ ADD_TEST(qgis_banned_keywords ${CMAKE_SOURCE_DIR}/tests/code_layout/test_banned_
|
||||
ADD_TEST(qgis_licenses ${CMAKE_SOURCE_DIR}/tests/code_layout/test_licenses.sh)
|
||||
ADD_TEST(qgis_spelling ${CMAKE_SOURCE_DIR}/scripts/spell_check/spell_test.sh)
|
||||
|
||||
ADD_TEST(qgis_shellcheck ${CMAKE_SOURCE_DIR}/tests/code_layout/test_shellcheck.sh)
|
||||
ADD_TEST(qgis_sipify ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sipify.sh)
|
||||
ADD_TEST(qgis_sip_include ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sip_include.sh)
|
||||
ADD_TEST(qgis_sip_uptodate ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sipfiles_uptodate.sh)
|
||||
|
15
tests/code_layout/test_shellcheck.sh
Executable file
15
tests/code_layout/test_shellcheck.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This runs shellcheck on all sh files
|
||||
|
||||
DIR=$(git rev-parse --show-toplevel)
|
||||
|
||||
pushd ${DIR} > /dev/null
|
||||
result=$(shellcheck $(find . -name '*.sh'))
|
||||
popd > /dev/null
|
||||
|
||||
if [[ $result ]]; then
|
||||
echo " *** shellcheck found script errors"
|
||||
echo "$result"
|
||||
exit 1
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user