Gitea: Language statistics hidden languages

Created on 16 Jun 2020  路  10Comments  路  Source: go-gitea/gitea

Currently we use languages hard coded in Gitea code. We should probably switch to using go-enry method to get language type and include only programming and markup languages in stats:
https://github.com/go-enry/go-enry/blob/dc6fc02209b37a02b64eed383a5f281059e86eac/common.go#L453

kinproposal

Most helpful comment

Idear: can we add a reposetting "excluded lang in status: xy, abc, ..."

I'd just do it via .gitattributes, that way it's portable and would work both on GitHub and Gitea. The relevant attribute to mark a glob undetectable is -linguist-detectable.

All 10 comments

Markup should be included too (HTML, CSS)

FWIW, GitHub does not hide either HTML or CSS from their stats.

Yes, hence why should most likely allow Markup along with Programming type.

Ah, misunderstood you. I wonder if we would have to include more then we currently exclude.

@lafriks if we only include programming languages, then https://gitea.com/gitea/blog would be a go project ... - dont know if this is the right way ...

Idear: can we add a reposetting "excluded lang in status: xy, abc, ..."

Idear: can we add a reposetting "excluded lang in status: xy, abc, ..."

I'd just do it via .gitattributes, that way it's portable and would work both on GitHub and Gitea. The relevant attribute to mark a glob undetectable is -linguist-detectable.

first we need .gitattributes parser ;) tho it should probably be part of go-git project

go-enry indicates in the README that it wants to support .gitattributes, maybe it shoud be there:

https://github.com/go-enry/go-enry#divergences-from-linguist

Was this page helpful?
0 / 5 - 0 ratings