github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.32k stars 4.27k forks source link

Language not showing up in repo #5575

Closed xyzesteban closed 3 years ago

xyzesteban commented 3 years ago

I have a JavaScript repo where the language is not being detected: https://github.com/xyzes/gradpath Other JavaScript repos I have do show that as the repo language

Expected behaviour

Repo gets "JavaScript" tag.

Alhadis commented 3 years ago

The troubleshooting docs describe why this is happening and how to fix it. For xyzes/gradpath, it appears to be because your source code resides under a directory named react-ui, which matches a rule in vendor.yml:

https://github.com/github/linguist/blob/971e152fabca12e0ad386833eecb7b15e312a09f/lib/linguist/vendor.yml#L226-L227

@Nixinova, @lildude — I'm wondering if this rule should be restricted to filenames, as opposed to files ending in .js residing in directories whose names start with react-. I've only used React/JSX once or twice, so I'm not familiar enough to make a confident judgement call.

xyzesteban commented 3 years ago

The troubleshooting docs describe why this is happening and how to fix it. For xyzes/gradpath, it appears to be because your source code resides under a directory named react-ui, which matches a rule in vendor.yml:

https://github.com/github/linguist/blob/971e152fabca12e0ad386833eecb7b15e312a09f/lib/linguist/vendor.yml#L226-L227

@Nixinova, @lildude — I'm wondering if this rule should be restricted to filenames, as opposed to files ending in .js residing in directories whose names start with react-. I've only used React/JSX once or twice, so I'm not familiar enough to make a confident judgement call.

Ah, yes. I guess that makes sense for the react-ui folder, since I have technically not checked in any of my own code for the UI yet. I only bootstrapped the project using Create React App. The react-ui folder is just a boilerplate with none of my own code (for now).

However, I did check in some JavaScript/NodeJS source code to the sam-app folder, which is the Back-End server for my app. Wondering if there is a similar rule for AWS Serverless apps that is causing that to get ignored too?

Alhadis commented 3 years ago

Looks to be a caching issue. I forked your repository, pushed a meaningless change, and now the stats are showing up as expected:

Figure 1

So to fix the missing stats of your repository, just push a change, however trivial: language stats are cached server-side and only updated when the repository's contents have changed.

lildude commented 3 years ago

Language bar is showing now. Closing

VaishnaviNagrale commented 1 year ago

the language bar is not showing in my flutter apps repository https://github.com/VaishnaviNagrale/flutter-weather what to do now?

lildude commented 1 year ago

Looks like the analysis job didn't run. Probably because everything is in a single commit. Try pushing another change. As an aside, you really should have opened a new discussion rather than commenting on an issue that is old and closed.

chetanbj2001 commented 1 year ago

help me!!!!!!!!!!! the language bar is not showing https://github.com/chetan-ope/EmployeeCrudApplication/tree/master what to do now?

lildude commented 1 year ago

@chetan-ope Please open a new discussion.