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

[Bug] Rust repositories are identified as TOML #10266

Closed
FunctionalHacker opened this issue Feb 14, 2020 · 8 comments
Closed

[Bug] Rust repositories are identified as TOML #10266

FunctionalHacker opened this issue Feb 14, 2020 · 8 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail issue/stale

Comments

@FunctionalHacker
Copy link

FunctionalHacker commented Feb 14, 2020

Example: https://git.reekynet.com
Look for the "lqsd" repository and you can see that it is identified as TOML, when it in fact is a Rust project.

@FunctionalHacker FunctionalHacker changed the title Rust repositories are identified as TOML [Bug] Rust repositories are identified as TOML Feb 14, 2020
@Aviortheking
Copy link

this is normal as there is more TOML content than Rust content

@lunny lunny added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Feb 14, 2020
@FunctionalHacker
Copy link
Author

FunctionalHacker commented Feb 14, 2020

There are four .rs files in src and one .toml file in the repository root.

EDIT: I don't know how the language detection works, but I think if there is a directory called "src" in the project root, it should ignore everything in root and only look in src to determine the language

@jolheiser
Copy link
Member

jolheiser commented Feb 14, 2020

GH correctly identified it as Rust, I'm assuming they have some override based on certain files etc.

It's being identified as TOML because there's more lines of TOML than Rust, likely due to the cargo files. (More lines isn't exactly correct, as it's based on file size not lines)

Using src is a possible solution for some cases, but it's definitely not fair to assume a src directory as the golden standard.

My guess is there'd be a list of things to look for that would "override" primary language, such as a cargo file or go.mod for Go etc etc.
When a project has more than one for some reason, it would just default to using most lines like currently?

@lafriks
Copy link
Member

lafriks commented Feb 17, 2020

Cargo.lock file is also detected as yaml so based on file size calculation seems correct

@stale
Copy link

stale bot commented Apr 17, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 17, 2020
@FunctionalHacker
Copy link
Author

Not stale

@stale
Copy link

stale bot commented Jun 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

@stale stale bot added the issue/stale label Jun 16, 2020
@jolheiser
Copy link
Member

Fixed by #11681

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail issue/stale
Projects
None yet
Development

No branches or pull requests

5 participants