johnthagen / clion-cppcheck

:ballot_box_with_check: cppcheck plugin for CLion
https://plugins.jetbrains.com/plugin/8143-cppcheck/
MIT License
31 stars 6 forks source link

"Show Clang Tidy Info" content being analyzed #38

Closed firewave closed 3 years ago

firewave commented 4 years ago

Environment

Expected behaviour

No analysis is performed.

Actual behaviour

The analysis is performed and causes an error since the file is just a temporary one and no longer available for analysis.

Steps to reproduce the behaviour

The issues is possibly caused by the title of the file tab ending with the file name i.e. the .cpp extension causing it to be passed to the analysis. There's probably a different mechanism to figure out the file type within the plugins.

johnthagen commented 3 years ago

For background, this plugin is using the file extension to determine if Cppcheck should be run against it:

https://github.com/johnthagen/clion-cppcheck/blob/ca1eab8ef83ece978185ee4d4ce9f33724f795e0/src/com/github/johnthagen/cppcheck/CppcheckInspection.java#L236-L260

firewave commented 3 years ago

I figured. I wonder if this is a limititation of the check() function and fixed by the newer visitor interface. Since the documentation of the SDK is lacking it's hard to tell. There might be other bugs with it. I already contacted JetBrains about this a while ago and I got a contact about CLion-specific SDK question. I didn't have the time to follow up on this but I still plan to.

firewave commented 3 years ago

I have a fix for this.