-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Misclassified C as C++ in data.table project #5028
Comments
@jangorecki This is a known problem: #1626 You can workaround it by overriding the language of |
I think it should work other way around. *.h files classified as C but actually being C++, those should require workarounds. |
@jangorecki I agree. But there's some technical limitations that need to be solved before that's possible. There's a lengthy discussion about it at #1626. Short-term, overriding with |
This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___."). Thank you for your contributions. |
Issue is still relevant and mentioned technical limitations doesn't seem to be addressed. |
Also occurring in my repository: |
Yes, h files should be recognized as C till the proper fix will be implemented. |
(EDITED): I was writing at the wrong issue. |
I also have this issue |
I'm closing this issue as it's essentially a duplicate of #1626 which I have now pinned to try and reduce the duplicates. |
It's not that simple. However, it is also classified as C++: ... and Objective-C: ... because it's valid in all three. Simply stripping from all but C will cause even more misclassification than currently seen with the current heuristics and classifier. Where things go wrong is when a file doesn't match any of the heuristics: So it falls through to the classifier which then has to make a guess based on the content of the samples it has. This is where things go wrong most of the time, especially with very small files. What we could do, which may be the best solution, is to completely remove the classifier step for I've started a PR at #5357 to implement this. |
This repository does not use any C++ code but some header files are classified as such:
https://github.com/Rdatatable/data.table
It is strange that h files are not considered as C unless C++ syntax is detected inside, I think that should be the default option.
I would appreciate fixing it.
The text was updated successfully, but these errors were encountered: