Skip to content

[Feature Request]: Ignore directories from language statistics bar #14786

Closed
@spacekookie

Description

@spacekookie
  • Gitea version (or commit ref): 1.13.0

  • Git version: N/A

  • Operating system: NixOS/ Linux (systemd)

  • Database (use [x]):

    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io: N/A

  • Log gist: N/A

Description

The linguist project used by GitHub (and GitLab) supports .gitattributes files in the repository tree to exclude certain directories or files. This is very useful when vendoring large code-bases.

I operate a monorepo for all my code, which contains subtrees for many of my project dependencies. Because of this the language bar is not representative of the languages I actually write.

It would be great if there was some way of telling gitea to ignore certain directories for the purpose of language statistics. I had a look at the code, but I really don't know Go and couldn't figure out how to implement it.

It doesn't neccessarily have to be the same .gitattributes format that linguist uses (it would be cool though!). It would already be enough if there was a list of "ignore paths" in the project settings screen.

Anyway, let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureCompletely new functionality. Can only be merged if feature freeze is not active.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions