Appears to do nothing.
ncook-hxgn opened this issue ยท 25 comments
Hi there,
I installed CppCheck and then this extension. I have a 'cppcheck analysis output' stream available in my Visual Studio Output window, however when I CppCheck Current Project, nothing happens. What gives?
The extension didn't ask for CppCheck's location.
Edit: I am able to use CppCheck via it's CLI successfully, generating output xmls files etc.
Surely this is some error on my behalf?
It's hard to say without debugging. Could be that something in the project structure or settings prevents the VS add-in from reading the project or from interpreting it as a C++ project. You could try a different project from a different source (some simple open-source tool from Github, for example. I used to use the LLVM solution for testing).
I will give the LLVM solution a go (didn't realise it I could just install it with VS before I started building it!).
Are there any secret-squirrel logging features available for the plugin?
Thanks for the speedy respone - apologies for taking a few days to get back to you.
Are there any secret-squirrel logging features available for the plugin?
Unfortunately, not. I didn't encounter many problems for which logging could be helpful. But clearly, it's time to add some. I'll look into it right now.
I seem to have the same problem, the code for determining types of items in a project doesn't work the way it used to. I'm looking into it.
That's great news. It would be awesome to have this working in VS alongside Clang-Tidy and MS Code Analysis ๐ช
To be honest, I'm disappointed in cppcheck - a big part of the reason why I haven't actively developed this extension for a long while. Cppcheck doesn't hold a candle to clang.
Try the attached extension:
CppcheckPlugin.zip
That's a bit disheartening to hear about cppcheck! Howcomes?
I renamed the zip to .vsix, and got an installation error.. it says it's missing an extension.vsixmanifest..
You need to extract the VSIX file from the ZIP archive, not just rename it :)
Ahaa, you got me!
So I am curious although it's off topic - what do prefer about Clang over CppCheck?
Cppcheck seems to suffer from not being an actual compiler, and also from having a very small development team. Failures to find includes, especially the system ones (Windows SDK), sometimes errors interpreting valid C++ syntax. Also, there could be way more different useful checks.
But don't be disheartened by my rambling, any static analysis tool is better than no tool, and the more you use simultaneously - the better.
That all makes sense to me! From what I remember of reading the CppCheck blurb on their website, they do say they have a slimmer focus, with their tool. I agree entirely, we'll need to figure out which tools serve us best for certain checks and work with them accordingly. Horses for Courses as they say ๐ I am just glad we are in a place now with VS where I can get three tools into developers hands for free - that's a long way from where we've been historically.
I've installed the extension from the zip, still no output I'm afraid. (It reports 1.4.3 as version). I'm attempting to scan LLVM.sln's clang executables/diagtool.vcxproj.
1.4.3 is the updated version indeed. Odd, since I was able to reproduce the error and then I fixed it. I guess I can't get away without proper debug logging after all. It'll take a bit because I don't have much free time these days, but I'll get back to you.
Sure thing :) I appreciate how responsive you've been, and there's no immediate rush - I am very much in the researching phase at the moment.
FWIW I'm using VS 2019 16.7.3 on a recently updated x64 Windows 10 Pro box (probably should have mentiond that earlier).
If you need a tester, I am here and happy to help - it doesn't take long to install the extension, open the LLVM solution, and have a go with it.
Still no output with VS 2019 16.10.3 on Win10 x64 21H1. I figured I'd get either a dialog or output in the log window showing analysis progress.
I might see if I can get this to build. I haven't investigated implementing an IDE extension before so the attempt should be interesting.
(I recently discovered the cppstories.com blog (good for advanced C++ programmers) and saw mention of the SonarSource static analyzer in his weekly newsletter. When I looked up static analyzers, I found cppcheck, and looking for VS integration led me here.)
I cloned/built/installed and the current master fixes the problem for me, using VS 16.10.4.
Interesting, thanks for the info. I'll check what it was that the master fixed over the last release and will then update the release.
Although there's non-zero chance that it worked simply because you built it locally, and didn't work because there's something wrong with the references in my binary package when it runs in your VS.
I unloaded my version and tried the one from your January zip file and that does nothing, as with 1.4.2. So it sounds like the build environment might be a factor.
Both my Release and Debug builds produce output. So it's not the configuration.
CppcheckPlugin (2).zip
Please try this VSIX I just built from master head on my machine, does it work?
@VioletGiraffe that one also didn't work for me :)
@yuyoyuppe, are you able to build the extension from source to confirm that the problem is related to the build environment/settings and not the source code itself?
Yep, building current master worked for me, so it's definitely something with your env
What about the package built by Github?
https://github.com/VioletGiraffe/cppcheck-vs-addin/suites/3451024510/artifacts/81918205
@VioletGiraffe that one does work, thank you.
Although the tool itself didn't produce any useful results unfortunately :(
@yuyoyuppe, maybe you didn't have enough errors in your code :)
Thank you for letting me know the version built by Github VM works.