diff --git a/tools/checkpatch.sh b/tools/checkpatch.sh index 13dd0e67f4..65952d986f 100755 --- a/tools/checkpatch.sh +++ b/tools/checkpatch.sh @@ -59,6 +59,17 @@ is_rust_file() { } check_file() { + if [ -x $@ ]; then + case $@ in + *.bat | *.sh | *.py) + ;; + *) + echo "$@: error: execute permissions detected!" + fail=1 + ;; + esac + fi + if [ "$(is_rust_file $@)" == "1" ]; then if ! command -v rustfmt &> /dev/null; then fail=1