Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better language state detect rule #33027

Open
yp05327 opened this issue Dec 29, 2024 · 1 comment
Open

Better language state detect rule #33027

yp05327 opened this issue Dec 29, 2024 · 1 comment
Labels

Comments

@yp05327
Copy link
Contributor

yp05327 commented Dec 29, 2024

Description

// by default we will only count the sizes of programming languages or markup languages

// or if there's only one language in the repository

When there's many non programming language or non markup language files in a repo, but if there's only one language, it will show this language no matter what type it is. This logic may confuse user in some cases.
e.g. there's only one python file, and many SQL file in the repo, then you will see that the language is 100% Python.
image
But if you remove the python file, you will see the language is 100% SQL.
image

It seems like a bug to the end user.

Gitea Version

latest

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

build

Database

None

@henrygoodman
Copy link
Contributor

henrygoodman commented Dec 31, 2024

It seems like Github by default does not show any languages that are not configured by linguist (SQL is classified a data language according to them), so a normal GH repo with only SQL files shows no language stats.

github/markup#348

Seems like it might be a deliberate choice here to show some fallback if no languages were detected (my speculation), although I agree it could be muddying the waters (i.e. if you want to show stats for data languages as a fallback, why not just include them by default too)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants