File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,12 @@ while IFS= read -r file_path; do
58
58
59
59
# shellcheck disable=SC2001 # We prefer to use sed here instead of bash search/replace
60
60
case " ${file_extension} " in
61
+ bazel) expected_file_header=$( sed -e ' s|@@|##|g' <<< " ${expected_file_header_template}" ) ;;
62
+ bzl) expected_file_header=$( sed -e ' s|@@|##|g' <<< " ${expected_file_header_template}" ) ;;
63
+ bazelrc) expected_file_header=$( sed -e ' s|@@|##|g' <<< " ${expected_file_header_template}" ) ;;
61
64
c) expected_file_header=$( sed -e ' s|@@|//|g' <<< " ${expected_file_header_template}" ) ;;
62
65
cmake) expected_file_header=$( sed -e ' s|@@|##|g' <<< " ${expected_file_header_template}" ) ;;
66
+ editorconfig) expected_file_header=$( sed -e ' s|@@|##|g' <<< " ${expected_file_header_template}" ) ;;
63
67
gradle) expected_file_header=$( sed -e ' s|@@|//|g' <<< " ${expected_file_header_template}" ) ;;
64
68
groovy) expected_file_header=$( sed -e ' s|@@|//|g' <<< " ${expected_file_header_template}" ) ;;
65
69
h) expected_file_header=$( sed -e ' s|@@|//|g' <<< " ${expected_file_header_template}" ) ;;
@@ -81,14 +85,15 @@ while IFS= read -r file_path; do
81
85
* )
82
86
error " Unsupported file extension ${file_extension} for file (exclude or update this script): ${file_path} "
83
87
paths_with_missing_license+=(" ${file_path} " )
88
+ continue
84
89
;;
85
90
esac
86
91
expected_file_header_linecount=$( wc -l <<< " ${expected_file_header}" )
87
92
88
93
file_header=$( head -n " ${expected_file_header_linecount} " " ${file_path} " )
89
94
normalized_file_header=$(
90
95
echo " ${file_header} " \
91
- | sed -e ' s/20[12][0123456789]- 20[12][0123456789]/YEARS/' -e ' s/20[12][0123456789]/YEARS/' \
96
+ | sed -E - e ' s/20[12][0123456789] ?- ? 20[12][0123456789]/YEARS/' -e ' s/20[12][0123456789]/YEARS/' \
92
97
)
93
98
94
99
if ! diff -u \
You can’t perform that action at this time.
0 commit comments