File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments