Support gitattributes for language stats #5556

Closed
opened 2025-11-02 06:28:50 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @silverwind on GitHub (Jun 16, 2020).

linguist supports various gitattributes to affect the language stats, I think we should too.

  • linguist-generated or maybe just generated for generated code
  • linguist-vendored or maybe just vendored for vendored code
  • linguist-language or maybe just language to override detected language

Both have the effect that matching files will be excluded from language stats.

There's more but I think these two are the most commonly used ones.

Originally created by @silverwind on GitHub (Jun 16, 2020). [linguist](https://github.com/github/linguist#using-gitattributes) supports various gitattributes to affect the language stats, I think we should too. - `linguist-generated` or maybe just `generated` for generated code - `linguist-vendored` or maybe just `vendored` for vendored code - `linguist-language` or maybe just `language` to override detected language Both have the effect that matching files will be excluded from language stats. There's more but I think these two are the most commonly used ones.
GiteaMirror added the type/enhancement label 2025-11-02 06:28:50 -06:00
Author
Owner

@silverwind commented on GitHub (Jul 27, 2020):

Actually this is now a duplicate of https://github.com/go-gitea/gitea/issues/10335, closing.

@silverwind commented on GitHub (Jul 27, 2020): Actually this is now a duplicate of https://github.com/go-gitea/gitea/issues/10335, closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5556