File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ set -o pipefail
3333# VARIABLES #
3434
3535# List of file extensions to process:
36- extensions=(" js" " mjs" " cjs" " json" " ts" " py" " jl" " R" " c" " h" " cpp" " hpp" " f" " sh" " awk" " html" " xml" " css" " md" " yml" " gypi" " bib" " tex" )
36+ extensions=(" js" " mjs" " cjs" " json" " ts" " py" " jl" " R" " c" " h" " cpp" " hpp" " f" " sh" " awk" " html" " xml" " css" " md" " yml" " gyp " " gypi" " bib" " tex" " mk " )
3737
3838
3939# FUNCTIONS #
@@ -70,13 +70,19 @@ main() {
7070 convert_line_endings " $file "
7171
7272 extension=" ${file##* .} "
73+ filename=$( basename " $file " )
74+
7375 local match_found=false
74- for ext in " ${extensions[@]} " ; do
75- if [[ " $ext " == " $extension " ]]; then
76- match_found=true
77- break
78- fi
79- done
76+ if [[ " $filename " == " Makefile" ]]; then
77+ match_found=true
78+ elif [[ " $file " == * .* ]]; then
79+ for ext in " ${extensions[@]} " ; do
80+ if [[ " $ext " == " $extension " ]]; then
81+ match_found=true
82+ break
83+ fi
84+ done
85+ fi
8086 if [[ " $match_found " == true ]]; then
8187 if [[ " $( tail -c1 " $file " ; echo x) " != $' \n x' ]]; then
8288 echo " Adding newline to: $file "
You can’t perform that action at this time.
0 commit comments