-
Notifications
You must be signed in to change notification settings - Fork 380
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
Undefined variables are not detected/reported #3146
Comments
|
@chinedufn |
|
I have absolutely no idea (: |
|
I've had this issue for a while but didn't think to check GitHub; will this ever be implemented without having to enable external linters? I'm also on macOS (CLion on Catalina specifically). It's relatively hard to fix without another source like this issue. |
|
@Undin is this another case of disabled unresolved reference inspection to avoid false positives? Do we want to fix it now? |
Yep.
The proper fix is to show error annotation of unresolved reference inspection by default. But currently, it will lead to false-positive errors in some cases. |
|
I just looked at Intellij as a Rust IDE today and have to say that I am bewildered how this issue has only two upvotes, let alone still exists .. |
|
Well, kind of. It is disabled because of false positives and even though it's possible that nowadays the plugin has a reasonably small amount of them so that it would be usable, there would still be some. You can play with the settings in It is in fact much harder to do this for Rust when compared to Go/Java, because the Rust compiler is much more complex and this plugin has to basically reimplement it from scratch. That's pretty much all there is to it, if I'm not mistaken. |


Environment
Problem description: undefined variables are not highlighted/reported. See screenshot. My expectation is to see
secret_numberon line 9 to be highlighted with red.Workarounds
Release 125
Preferences | Languages & Frameworks | Rust | Cargo | Run external linter to analyze code on the flyoption. Note, it's CPU consuming especially on large projectsIgnore unresolved references without quick fixoption ofRust | Unresolved referenceinspection inPreferences | Editor | Inspectionssettings. Note, it may lead to false-positive error annotations.The text was updated successfully, but these errors were encountered: