Commit 589e4076 authored by foo0x29a's avatar foo0x29a

Pick the first extension matched

parent 1f4f0123
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment