{{ message }}
Add Go Template and differentiate from Smarty#7687
Merged
Conversation
lildude
requested changes
Nov 27, 2025
lildude
left a comment
Member
There was a problem hiding this comment.
Along with the inline comments, we also need a sample and supporting search string for all extensions you are adding support for. Any one extension that doesn't meet usage requirements will block this PR from being merged until it does so it's best to start small and add support later as usage grows. Users can use an override in the mean time.
Contributor
Author
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Add Go template as a new language.
This PR is intended to solve #7639 and #6196 so that Helm chart repositories are classified correctly.
Note that Go template use braces similarly to Jinja
{{ }}and the file extension might not differentiate template languages in general. So this PR focus only on Smarty - Go template differences as they usually share the same extension in Helm charts.Rationale for added extensions:
.gohtml: IntelliJ IDEA has association with this extension. (link to source).html.tmpl: GitHub search verifies that is widely used. Mentioned in a StackOverflow answer and also default in a Prettier plugin..gotmpl,.tmpl: Default extensions of Go template files the Go language server (gopls) (link to documentation). Also the VS Code Go Plugin use this default (link to docs)..tpl: Convention used in Helm charts as stated by the Helm documentation ("Conventionally, Helm charts put [...] templates inside of a partials file, usually _helpers.tpl")Since none of the extensions are defined by the Go template documentation, and none of the supporting tools stick to one particular default, I left the list in alphabetical order in the
languages.ymlconfig.Checklist:
I am adding a new language.
_helpers.tplhttps://github.com/search?type=code&q=NOT+is%3Afork+path%3A**%2F_helpers.tpl+%7B%7B-.gohtmlhttps://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.gohtml.gotmplhttps://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.gotmpl.html.tmplhttps://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.html.tmpl.tmplhttps://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.tmpl+%7B%7B-.tplhttps://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.tpl+%7B%7B-#00ADD8I am fixing a misclassified language
I am updating a grammar submodule