GLSL fragment shader file recognized as JavaScript #5480
-
I just found that the language analysis on my repo is incorrectly reporting So I searched in this repository and found that I'm not an expert in JavaScript, so I'm wondering does Interestingly, this looks like a random error, because the same problem does not occur in this repo, but exists in that one, where Should I open an issue on this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It does… well, in a subset of JavaScript. It seems Angular uses this extension.
As both languages use the same extension, we need to rely on heuristics and the classifier to determine the language. There isn't currently a heuristic so we rely entirely on the classifier which is trained on the samples we have. In both cases, the samples we have appear to be quite small and similar to my naive eye, so the classifier has a higher chance of getting it wrong.
A PR to improve things would be preferred. Adding a heuristic and more representative samples of each language would help improve things. |
Beta Was this translation helpful? Give feedback.
It does… well, in a subset of JavaScript. It seems Angular uses this extension.
As both languages use the same extension, we need to rely on heuristics and the classifier to determine the language. There isn't currently a heuristic so we rely entirely on the classifier which is trained on the samples we have. In both cases, the samples we have appear to be quite small and similar to my naive eye, so the classifier has a higher…