boyter / scc

Sloc, Cloc and Code: scc is a very fast accurate code counter with complexity calculations and COCOMO estimates written in pure Go
MIT License
6.56k stars 259 forks source link

.gitattributes linguist-language (language detection override) isn't taken into account #352

Open ell1e opened 1 year ago

ell1e commented 1 year ago

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

  1. Clone or create a repo that uses .gitattributes to override something, here is an example line you can put into .gitattributes in your repo root for testing:
    *.mylang linguist-language=MyLang

    Then make sure any non-empty stuff.mylang file is present.

  2. 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):

boyter commented 1 year ago

Dammit wrong issue.