Why do I get error messages like "Unable to activate XX analyzer" in vscode?

Viewed 6758

I have added some extensions in vscode and after that, every time I open/switch to a tab with a C file, I am getting a dropdown with three error messages about not being able to activate analyzers. Why?

Here are the extensions:

List of extensions

and here are the error messages:

error messages

1 Answers

That should be caused by c/c++ Advanced lint module, well the same error can be caused by others modules, those errors occur, when you don't have those modules that you are getting warning about installed, in this case Clang, CppCheck, and flexeLint. Well for the two first you can download and install them from here:

for those programs, once installed, by default should be added to the system path environment variable (if not you can do it yourself, cppcheck don't add automatically to path in windows), the thing if they are added to the path, vscode or the calling plugin here "c/c++ Advanced lint", will recognize them, because will test if the command is recognized at the console level. If you don't want to add those tools to path, you can still specify in parameters the path to those tools executables, for that you can follow the instruction for every module here they are :

well you can also check that : https://marketplace.visualstudio.com/items?itemName=jbenden.c-cpp-flylint

it's so often that plugins depends on others programs, on which you need to install manually, and every time, you need to read the documentation for the module to be installed, to see what configuration you need to do.

for the warning about flexlint you can disable it by adding this to the user settings :

  • "c-cpp-flylint.flexelint.enable": false

that disable completely the use of flexlint, and so the plugin will not search for it. I'm not sure, may be setting cppcheck is sufficient, otherwise you have that to set. I personally have that set. Of course unless you count to buy the product and then just set the path.

hope you all, all the best!

Related