2020-12-24 20:06:38 +01:00
|
|
|
#!/usr/bin/env sh
|
2020-05-10 20:09:31 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2016-01-25 23:12:21 +01:00
|
|
|
#
|
|
|
|
# DESCR: Check that source files are not executable
|
|
|
|
|
2022-06-03 08:06:57 +02:00
|
|
|
LINTDIR="$(
|
|
|
|
cd -- "$(dirname "$0")" > /dev/null 2>&1 || return
|
|
|
|
pwd -P
|
|
|
|
)"
|
|
|
|
|
|
|
|
# shellcheck source=helper_functions.sh
|
|
|
|
. "${LINTDIR}/helper_functions.sh"
|
|
|
|
|
|
|
|
# Exit if the code isn't in a git repo
|
|
|
|
if [ "${IN_GIT_TREE}" -eq 0 ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
${GIT} ls-tree --full-tree -r HEAD src tests |grep "^100[7531][7531][7531] blob " | cut -f2- | grep -v "\.sh$" | \
|
2016-01-25 23:12:21 +01:00
|
|
|
sed -e "s,^.*$,File & has one or more executable bits set in the file permissions.,"
|