Update utils/check-style/check-style

This commit is contained in:
Mikhail f. Shiryaev 2024-06-12 16:11:21 +02:00 committed by GitHub
parent 3ff69a9a03
commit 9d1f64e8b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,7 +241,13 @@ for test_case in "${tests_with_replicated_merge_tree[@]}"; do
done
# All the submodules should be from https://github.com/
find $ROOT_PATH -name '.gitmodules' | while read i; do grep -F 'url = ' $i | grep -v -F 'https://github.com/' && echo 'All the submodules should be from https://github.com/'; done
git config --file "$ROOT_PATH/.gitmodules" --get-regexp 'submodule\..+\.url' | \
while read -r line; do
name=${line#submodule.}; name=${name%.url*}
url=${line#* }
[[ "$url" != 'https://github.com/'* ]] && echo "All the submodules should be from https://github.com/, submodule '$name' has '$url'"
done
# All submodules should be of this form: [submodule "contrib/libxyz"] (for consistency, the submodule name does matter too much)
# - restrict the check to top-level .gitmodules file