-
Notifications
You must be signed in to change notification settings - Fork 6
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
Multiple warnings on same line might not be shown #37
Comments
For what it's worth, we do capture and send multiple problem reports back up to CLion. If you run Analyze | Inspect Code you will see multiple warnings even for a single line. This might be a limitation with the plugin API we are using. |
That's possible. I haven't looked at it at all. I first need to be able to understand how to test a development plugin in CLion. |
See if #44 helps at all. |
I was able to build the plugin before based on 2020.1 or 2020.2. Somehow the latest SDK from 2020.3 EAP isn't working anymore.
But when I try to re-add the plugin SDK I get errors. So it might actually be a bug in IDEA. Will try to take a deeper look soon. |
For what it's worth, I am using 2020.2.3 currently successfully. |
I think this issue is actually possibly invalid. If you hold your cursor on the gutter, you can actually see multiple warnings. I think this is just how IntelliJ products work. I'm guessing that IntelliJ perhaps only shows the most severe warning when you hover over the text, but will show multiple in the gutter and Analyze | Inspect Code |
Closing as invalid as this appears to be normal behavior for IntelliJ-based tools. |
Please re-open it. I want to investigate this at least a bit as this should be working. Recently I have just been logging issues and not following up on them for lack of time. Other parts of CLion can also show multiple issues on the same line - heck, it's actually bound to multiple part of the same line depending on the index. Maybe I missed something, the plugin needs to report it differently or it's even a bug in CLion. |
Thanks - there's still the Seems like this is an issue within CLion - https://youtrack.jetbrains.com/issue/CPP-22712. I think this issue should stay open until it is resolved upstream. FYI I also found some additional issues in CLion and Cppcheck while researching this. |
BTW I am able to build the plugin again. Turns out I had to switch to JDK 11 as the SDK. The IDEA error message even says that but I somehow overlooked that in my first few attempts. I also found the |
I ran into this again. #include <string>
static void f()
{
std::string s6(0);
}
<error id="nullPointer" severity="error" msg="Null pointer dereference" verbose="Null pointer dereference" cwe="476" file0="C:/Users/username/AppData/Local/Temp/ZF4azrQ5_input.cpp">
<location file="C:\Users\username\AppData\Local\Temp\ZF4azrQ5_input.cpp" line="5" column="17" info="Null pointer dereference"/>
</error>
<error id="unreadVariable" severity="style" msg="Variable 's6' is assigned a value that is never used." verbose="Variable 's6' is assigned a value that is never used." cwe="563" file0="C:/Users/username/AppData/Local/Temp/ZF4azrQ5_input.cpp">
<location file="C:\Users\username\AppData\Local\Temp\ZF4azrQ5_input.cpp" line="5" column="19"/>
<symbol>s6</symbol>
</error> |
Environment
cppcheck --version
): 1.90Steps to reproduce the behaviour
This code
Produces four warnings
The warnings on line 6 will both be shown, but line 7 omits the style one.
The text was updated successfully, but these errors were encountered: