This is an automated email from the ASF dual-hosted git repository. pkarashchenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit bf5c7b6e5d2a47ae4fb5b823eb8754216034b6eb Author: Xiang Xiao <[email protected]> AuthorDate: Wed Feb 1 07:37:10 2023 +0800 tools/checkpatch.sh: Check the source code doesn't set executable bit Signed-off-by: Xiang Xiao <[email protected]> --- tools/checkpatch.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) 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
