tools/checkpatch.sh: Check the source code doesn't set executable bit
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
0a66cbdcdd
commit
bf5c7b6e5d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue