Skip to content

Commit aeaea85

Browse files
committed
Add check for executable bit
1 parent e05a5d0 commit aeaea85

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/check_samples.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,27 @@ jobs:
1818
NOT_SAMPLES=$(find . -not -path '*/\.*' -type f ! \( -name '*.conf.sample' -o -name 'README.md' -o -name 'LICENSE' \))
1919
NOT_SAMPLES_COUNT=$(echo "${NOT_SAMPLES}" | wc -w)
2020
if (( NOT_SAMPLES_COUNT > 0 )); then
21-
echo "The following files are not allowed:"
21+
echo "The following files have extensions that are not allowed:"
2222
echo "${NOT_SAMPLES}"
2323
exit 1
2424
fi
2525
26+
- name: Check Executable Bit
27+
run: |
28+
EXECUTABLE_BIT=$(find . -not -type d -executable)
29+
EXECUTABLE_BIT_COUNT=$(echo "${EXECUTABLE_BIT}" | wc -w)
30+
if (( EXECUTABLE_BIT_COUNT > 0 )); then
31+
echo "The following files have executable permissions (not allowed):"
32+
echo "${EXECUTABLE_BIT}"
33+
exit 1
34+
fi
35+
2636
- name: Check Line Endings
2737
run: |
2838
CRLF_ENDINGS=$(find . -not -type d -exec file "{}" ";" | grep CRLF || true)
2939
CRLF_ENDINGS_COUNT=$(echo "${CRLF_ENDINGS}" | wc -w)
3040
if (( CRLF_ENDINGS_COUNT > 0 )); then
31-
echo "The following files are not allowed:"
41+
echo "The following files have CRLF line endings (not allowed):"
3242
echo "${CRLF_ENDINGS}"
3343
exit 1
3444
fi

0 commit comments

Comments
 (0)