mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Pick the first extension matched
This commit is contained in:
parent
1f4f0123ed
commit
589e4076dd
@ -93,13 +93,11 @@ def file_passes(filename, refs, regexs):
|
||||
else:
|
||||
ref = refs[basename]
|
||||
|
||||
# remove build tags from the top of Go files
|
||||
if extension == "go" or extension =="generatego":
|
||||
# remove extra content from the top of files
|
||||
if extension == "go" or extension == "generatego":
|
||||
p = regexs["go_build_constraints"]
|
||||
(data, found) = p.subn("", data, 1)
|
||||
|
||||
# remove shebang from the top of shell files
|
||||
if extension == "sh":
|
||||
elif extension == "sh":
|
||||
p = regexs["shebang"]
|
||||
(data, found) = p.subn("", data, 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user