.gitattributes linguist-language (language detection override) isn't taken into account
Author: ell1eCreated Oct 7, 2022Updated Oct 1, 2024
Labelsenhancement
Describe the bug
A .gitattributes file's linguist-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
- Clone or create a repo that uses
.gitattributesto override something, here is an example line you can put into.gitattributesin your repo root for testing:Then make sure any non-empty*.mylang linguist-language=MyLangstuff.mylangfile is present. - Run scc on the repository.
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):
- OS: Fedora Linux
- OS Version 26
- SCC Version: 3.1.0
Source: boyter/scc