Open gms8994 opened 3 weeks ago
The use of "multi" extensions is an odd one to deal with. Note that the count as you have there wouldn't work anyway because it tries to match based on the language and then the extension if possible. A custom mapping like this "Javascript Tests" would do nothing because nothing would match it
$ scc --languages | rg -i javascript
JavaScript (js,mjs)
However such a mapping could be useful and fits into the ideas I am working on in https://github.com/boyter/scc/issues/462 where you can supply a custom language type which would resolve this.
It would require more work to deal with the .test.js
example you have here however but it might be worth it. I am linking the two together to keep track of it.
Describe the bug I'm trying to use
--count-as
to convertfile.test.js
toJavascript Tests
, but maybescc
is only looking at the actual extension (.js
) on the files when performing this conversion.To Reproduce
This also performs the same when using the docker image
Expected behavior The file and lines inside
blah.test.js
and any other files named like.test.js
would be counted asJavascript Tests
.Desktop (please complete the following information):