-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: ignore build system input .in
extension when determining the type
#727
Comments
Template files are a weird case because they contain multiple languages. Which language should we check? For backup files, I assume we would instead want to ignore all of them. |
Right, ignoring backups would make sense for typos. Regarding templates, the case I'm mostly interested in is the For this specific case, using appropriate type specific extend-globs like [type.sh]
extend-glob = ["*.sh.in"] ...does seem to serve as a workaround for the time being. |
I was referring to when you have a template language mixed in with the generated output. You could say php/html is an example of this. See also liquid, tera, ninja, handlebars, etc. |
Another aspect of backups is that hopefully they are gitignored (in the per-user ignore file) which typos will then ignore by defalt. |
Right, agreed on both, and the PHP example is an interesting one. Anyway as far as I'm concerned, this RFE reduces to just stripping the literal trailling |
I'd be fine with just stripping |
.in
extension when determining the type
`.in` is typically used for build system template input files, containing some placeholders to replace. In some cases, multiple rounds of replacements are used, each with their own `.in`, so remove all trailing instances of it before attempting a filename match. Closes crate-ci#727
Would be good to strip known template/backup filename extensions before attempting a match against a filename/extension glob.
Here's an implementation of that I did some time ago for
bat
: sharkdp/bat#1687The text was updated successfully, but these errors were encountered: