@@ -63,29 +63,42 @@ while IFS= read -r file_path; do
63
63
# shellcheck disable=SC2001 # We prefer to use sed here instead of bash search/replace
64
64
case " ${file_extension} " in
65
65
bazel) comment_marker=' ##' ;;
66
- bzl) comment_marker=' ##' ;;
67
66
bazelrc) comment_marker=' ##' ;;
67
+ bzl) comment_marker=' ##' ;;
68
68
c) comment_marker=' //' ;;
69
69
cmake) comment_marker=' ##' ;;
70
+ code-workspace) continue ;; # VS Code workspaces are JSON and shouldn't contain comments
71
+ CODEOWNERS) continue ;; # Doesn't need a license header
72
+ Dockerfile) comment_marker=' ##' ;;
70
73
editorconfig) comment_marker=' ##' ;;
74
+ flake8) continue ;; # Configuration file doesn't need a license header
75
+ gitignore) continue ;; # Configuration files don't need license headers
71
76
gradle) comment_marker=' //' ;;
72
77
groovy) comment_marker=' //' ;;
78
+ gyb) comment_marker=' //' ;;
73
79
h) comment_marker=' //' ;;
74
80
in) comment_marker=' ##' ;;
75
81
java) comment_marker=' //' ;;
76
82
js) comment_marker=' //' ;;
77
- json) continue ;; # JSON doesn't support comments
83
+ json) continue ;; # JSON doesn't support line comments
78
84
jsx) comment_marker=' //' ;;
79
85
kts) comment_marker=' //' ;;
86
+ md) continue ;; # Text files don't need license headers
87
+ mobileconfig) continue ;; # Doesn't support comments
88
+ modulemap) continue ;; # Configuration file doesn't need a license header
89
+ plist) continue ;; # Plists don't support line comments
80
90
proto) comment_marker=' //' ;;
81
91
ps1) comment_marker=' ##' ;;
82
92
py) comment_marker=' ##' ; header_prefix=$' #!/usr/bin/env python3\n ' ;;
83
93
rb) comment_marker=' ##' ; header_prefix=$' #!/usr/bin/env ruby\n ' ;;
84
94
sh) comment_marker=' ##' ; header_prefix=$' #!/bin/bash\n ' ;;
85
- swift) comment_marker=' //' ;;
86
95
swift-format) continue ;; # .swift-format is JSON and doesn't support comments
96
+ swift) comment_marker=' //' ;;
87
97
ts) comment_marker=' //' ;;
88
98
tsx) comment_marker=' //' ;;
99
+ txt) continue ;; # Text files don't need license headers
100
+ yml) continue ;; # YAML Configuration files don't need license headers
101
+ yaml) continue ;; # YAML Configuration files don't need license headers
89
102
* )
90
103
error " Unsupported file extension ${file_extension} for file (exclude or update this script): ${file_path} "
91
104
paths_with_missing_license+=(" ${file_path} " )
0 commit comments