Misidentifying code as CLIPS #6252
-
Describe the bugDoes Linguist rely primarily on filename extension? It seems to, despite the docs talking about heuristics and other methods. Looking at my repo (a LinuxCNC set of configuration and code files), Linguist has misidentified at least two files. One ends in Expected behaviourI suppose it's a reasonable way to go, so feel free to close this "bug," but I wanted to point it out. The file contents look nothing like the Lisp of CLIPS. In any case, I'm working on adding a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Linguist uses multiple strategies as detailed in https://github.com/github/linguist/blob/master/docs/how-linguist-works.md It works from most specific to least specific in an attempt to reduce the number of possible languages as it progresses through the strategies whilst still being efficient. The extension does however have a large influence as it is one of the first strategies used and if that extension is only associated with one language, that language is used and no further stragies are considered.
This will be because the The same applies to the Support can be added for other languages, but usage levels across GitHub need to be met.
Yes, this is expected and be design. Looking at file content is an expensive operation so is only done when no other simpler strategies identify a language.
Linguist only analyses the default branch. This is documented. |
Beta Was this translation helpful? Give feedback.
Linguist uses multiple strategies as detailed in https://github.com/github/linguist/blob/master/docs/how-linguist-works.md It works from most specific to least specific in an attempt to reduce the number of possible languages as it progresses through the strategies whilst still being efficient. The extension does however have a large influence as it is one of the first strategies used and if that extension is only associated with one language, that language is used and no further stragies are considered.