As a new feature, I suggest you support .gitattributes linguist-language entries, including for unrecognized languages. This is already supported by Gitea and means if a repository contains a completely new, and/or very domain-specific niche language, an entry in .gitattributes provided by the repository maintainers will easily make everything "just work". If the tooling plays along of course, which ohcount currently doesn't.
Current output:
$ git init .
Initialized empty Git repository in /home/user/test/.git/
$ echo -e "A\n\nB\nC" > ./test.mylang
$ echo "*.mylang linguist-language=MyLang" > .gitattributes
$ git add test.mylang .gitattributes
$ git commit -m "Language count test"
[main (root-commit) e716e77] Language count test
2 files changed, 4 insertions(+)
create mode 100644 .gitattributes
create mode 100644 test.mylang
$ ohcount .
Examining 2 file(s)
Ohloh Line Count Summary
Language Files Code Comment Comment % Blank Total
---------------- ----- --------- --------- --------- --------- ---------
---------------- ----- --------- --------- --------- --------- ---------
Total 0 0 0 0.0% 0 0
Expected output:
$ git init .
Initialized empty Git repository in /home/user/test/.git/
$ echo -e "A\n\nB\nC" > ./test.mylang
$ echo "*.mylang linguist-language=MyLang" > .gitattributes
$ git add test.mylang .gitattributes
$ git commit -m "Language count test"
[main (root-commit) e716e77] Language count test
2 files changed, 4 insertions(+)
create mode 100644 .gitattributes
create mode 100644 test.mylang
$ ohcount .
Examining 2 file(s)
Ohloh Line Count Summary
Language Files Code Comment Comment % Blank Total
---------------- ----- --------- --------- --------- --------- ---------
MyLang 1 3 0 0.0% 1 4
---------------- ----- --------- --------- --------- --------- ---------
Total 1 3 0 0.0% 1 4
As a new feature, I suggest you support .gitattributes linguist-language entries, including for unrecognized languages. This is already supported by Gitea and means if a repository contains a completely new, and/or very domain-specific niche language, an entry in
.gitattributesprovided by the repository maintainers will easily make everything "just work". If the tooling plays along of course, which ohcount currently doesn't.Current output:
Expected output: