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

[Feature] support disable repository programing language Detection #10335

Closed
ddatsh opened this issue Feb 18, 2020 · 21 comments
Closed

[Feature] support disable repository programing language Detection #10335

ddatsh opened this issue Feb 18, 2020 · 21 comments
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality

Comments

@ddatsh
Copy link

ddatsh commented Feb 18, 2020

as title

@lunny lunny added the type/enhancement An improvement of existing functionality label Feb 18, 2020
@lafriks
Copy link
Member

lafriks commented Feb 18, 2020

Any reason/use case on why?

@guillep2k
Copy link
Member

Related: #7953

@lunny
Copy link
Member

lunny commented Feb 19, 2020

@lafriks Because they have small memory and don't think this feature is necessary. but have many big repo. And this feature spend many memory.

I also think this feature is just useful for public gitea instances or big enterprise gitea instances.

@stale
Copy link

stale bot commented Apr 19, 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 19, 2020
@lunny
Copy link
Member

lunny commented Apr 19, 2020

Related: #7953

No. That's not the same case. One is for UI language and this one is for repositories' programing languages detection.

@stale stale bot removed the issue/stale label Apr 19, 2020
@lunny lunny changed the title [Feature] support disable language Detection [Feature] support disable repository programing language Detection Apr 19, 2020
@dahrens
Copy link

dahrens commented May 28, 2020

Because I have a typescript project that uses yarn for dependency management: my programming language is now YAML - since yarn.lock is usually huge :)

screenshot_from_2020-05-28_17-25-52

Ignoring specific files might also solve this.... Of course this is completely negligible...

@silverwind
Copy link
Member

silverwind commented May 28, 2020

Should be per-repo. I think supporting the linguist gitattributes is a good idea which probably makes this an upstream issue.

@stale
Copy link

stale bot commented Jul 27, 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 Jul 27, 2020
@6543
Copy link
Member

6543 commented Jul 27, 2020

upstream issue: src-d/enry#18 go-enry/go-enry#27

@silverwind
Copy link
Member

silverwind commented Jul 27, 2020

Copying my info from the other issue:


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

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.

@stale
Copy link

stale bot commented Sep 26, 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 Sep 26, 2020
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Sep 26, 2020
@stale stale bot removed the issue/stale label Sep 26, 2020
@yurenchen000
Copy link

Any reason/use case on why?

Sometimes it gets wrong language,
maybe it is better to manually specify the value or disable it than the wrong value

@delvh
Copy link
Member

delvh commented Mar 4, 2023

You can use the .gitattributes to configure what file (type) gets what highlighter.

@yurenchen000
Copy link

You can use the .gitattributes to configure what file (type) gets what highlighter.

@delvh
thanks for your reply.

I want to Specify or Disable the language type here (in Repositories list page)
I wonder if this is possible?

gitea_lang_type

@delvh
Copy link
Member

delvh commented Mar 4, 2023

Ah, you mean the global one.
Hmm…
Does https://github.com/github/linguist/blob/master/docs/overrides.md perhaps help?
I think -linguist-detectable or linguist-documentation sounds promising.

@yurenchen000
Copy link

yurenchen000 commented Mar 4, 2023

@delvh
Thanks for your patience, I'll try this doc.

I temporarily use sql to modify the database:

-- change one language in a repo
update language_stat set language='Markdown'  where id=THE_ID;

//this seems not right way. it's Repositories's languages and ratio info

@silverwind
Copy link
Member

silverwind commented Mar 6, 2023

I doubt we support all linguist-* attributes yet, but we do at least support some like linguist-language and linguist-vendored.

@King555a
Copy link

King555a commented Apr 3, 2023

Are there any plans to support linguist-documentation in .gitattributes?

@silverwind
Copy link
Member

I'm not up to date where these linguist attributes are currently supported (e.g. gitea vs. go-enry dependency), but there might be a dependency on getting it in go-enry first:

go-enry/go-enry#27

@silverwind
Copy link
Member

linguist-language is supported since a while ago.

Copy link

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

10 participants