fixed extensions
This commit is contained in:
7
main.go
7
main.go
@@ -302,7 +302,7 @@ func licenseHeader(path string, tmpl *template.Template, data licenseData) ([]by
|
|||||||
lic, err = executeTemplate(tmpl, data, "/**", " * ", " */")
|
lic, err = executeTemplate(tmpl, data, "/**", " * ", " */")
|
||||||
case ".cc", ".cpp", ".cs", ".go", ".hcl", ".hh", ".hpp", ".m", ".mm", ".proto", ".rs", ".swift", ".dart", ".groovy", ".v", ".sv":
|
case ".cc", ".cpp", ".cs", ".go", ".hcl", ".hh", ".hpp", ".m", ".mm", ".proto", ".rs", ".swift", ".dart", ".groovy", ".v", ".sv":
|
||||||
lic, err = executeTemplate(tmpl, data, "", "// ", "")
|
lic, err = executeTemplate(tmpl, data, "", "// ", "")
|
||||||
case ".py", ".sh", ".yaml", ".yml", ".dockerfile", "dockerfile", ".rb", "gemfile", ".tcl", ".tf", ".bzl", ".pl", ".pp", "build", ".build", ".toml":
|
case ".py", ".sh", ".yaml", ".yml", ".dockerfile", ".rb", "gemfile", ".tcl", ".tf", ".bzl", ".pl", ".pp", "build", ".build", ".toml":
|
||||||
lic, err = executeTemplate(tmpl, data, "", "# ", "")
|
lic, err = executeTemplate(tmpl, data, "", "# ", "")
|
||||||
case ".el", ".lisp":
|
case ".el", ".lisp":
|
||||||
lic, err = executeTemplate(tmpl, data, "", ";; ", "")
|
lic, err = executeTemplate(tmpl, data, "", ";; ", "")
|
||||||
@@ -328,7 +328,10 @@ func licenseHeader(path string, tmpl *template.Template, data licenseData) ([]by
|
|||||||
if base == "cmakelists.txt" || strings.HasSuffix(base, ".cmake.in") || strings.HasSuffix(base, ".cmake") {
|
if base == "cmakelists.txt" || strings.HasSuffix(base, ".cmake.in") || strings.HasSuffix(base, ".cmake") {
|
||||||
lic, err = executeTemplate(tmpl, data, "", "# ", "")
|
lic, err = executeTemplate(tmpl, data, "", "# ", "")
|
||||||
}
|
}
|
||||||
if base == "Jenkinsfile" || strings.HasSuffix(base, ".groovy") {
|
if base == "jenkinsfile" || strings.HasSuffix(base, ".groovy") {
|
||||||
|
lic, err = executeTemplate(tmpl, data, "", "// ", "")
|
||||||
|
}
|
||||||
|
if base == "dockerfile" || strings.HasSuffix(base, ".dockerfile") {
|
||||||
lic, err = executeTemplate(tmpl, data, "", "// ", "")
|
lic, err = executeTemplate(tmpl, data, "", "// ", "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user