-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
.gitattributes linguist-language (language detection override) isn't taken into account #352
Comments
Dammit wrong issue. |
IMO supporting However, I think the |
Would you really need to, for it to be an improvement? If you just took the name from |
I'm thinking, for example, how linguist has TSX as a separate language, while SCC treats TSX and TypeScript as the same language. So if a user had something like this: *.ts linguist-language=TSX Then that's an unknown language for SCC. So it raises the question of what SCC should do in that case. Should SCC also split TSX into a separate language? Should TSX be an alias of TypeScript in SCC? And as another example, SCC considers Docker Ignore to be its own language, while Linguist puts it with other Ignore List files. So if I try to tell GitHub/Linguist that my generic My comment about |
Oh I see, interesting. I admit I didn't realize there were so many differences, and I get that you're not looking forward to maintaining a mapping table at all times to untangle this. Maybe it could be an option for scc to process |
If this were to be done I would be inclined to have scc use its defaults but defer to linguist ones where they are known, falling back to the defaults (with a warning) if thats the case. |
Oh, I'm just a random user browsing the issues and offering my thoughts, I don't represent the SCC project or its maintainers 😅 Sorry if I made it sound that way. |
No I like hearing others ideas. Generally though I opt for the path of least surprise. What I have described is how I would approach it, based on how I would expect it to work. If someone else has different expectations I want to hear it. |
Describe the bug
A
.gitattributes
file'slinguist-language
entries seem to be ignored. These are language detection overrides based on specified files or file patterns, for use e.g. when a language in the repository is often detected wrong or is unlikely to be known by any tools looking at it. This might for example be the case if it's a small, domain-specific language made just for that specific project.To Reproduce
.gitattributes
to override something, here is an example line you can put into.gitattributes
in your repo root for testing:stuff.mylang
file is present.Expected behavior
With above steps to reproduce
MyLang
should show up in the listing, or whatever override is specified. At least when I tried it, this wasn't the case.Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: