-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Ragel in C++ Host is incorrectly identified as 'Ragel in Ruby Host' #1251
Comments
Thanks for reporting this. Unfortunately as If |
Huh? Was this closed as won't-fix? The issue is not fixed but you have closed the bug. On the other hand you have suggested a pull request. Doesn't really make sense. Regarding the by-filename detection: is this really how linguist works? Because this would be very limiting. I mean what does linguist do about
Thus, as a first step it would make much sense to change 'Ragel in Ruby Host' to just 'Ragel'. And if you want to get ambitious you can still add a more sophisticated detection of the language of the embedded action bodies/glue code. |
Hi @gsauthof - hopefully I've explained what the current situation is -
Linguist has a number of strategies for identifying languages, the first is by filename which will return For files such as STRATEGIES = [
Linguist::Strategy::Filename,
Linguist::Shebang,
Linguist::Heuristics,
Linguist::Classifier
] As I said in my earlier comment, if |
Source: Download http://www.colm.net/files/ragel/ragel-6.9.tar.gz and look unter `examples`. There are a bunch of `.rl` files that all contain Ragel specifications with some C or C++ in action snippets. Not one example including ruby. Ragel (the state machine description compiler/language) also supports languages besides C/C++, but a .rl file usually contains just small snippets of the target language (C/C++ ...) in actions of a state machine. Thus, the correct classification of `.rl` files is just 'Ragel' and NOT 'Ragel in Ruby Host'. See also my comment in the prematurely closed issue: github-linguist#1251 (comment)
This search returns some false positives:
https://github.com/gsauthof/imapdl/search?l=ragel%20in%20ruby%20host
There is no Ruby code at all - the correct host language would be C++.
The text was updated successfully, but these errors were encountered: