News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

CppCheck not working?

Started by fmc0501, August 15, 2020, 02:04:19 AM

Previous topic - Next topic

fmc0501

I installed cppcheck using
sudo apt install cppcheck
and restarted C::B.

Checked to make sure CppCheck loaded, then opened a console program and removed
using namespace std;
and added
cout <<
inside main. I thought, through the use of CppCheck, that I'd get an error for leaving off std::, but I didn't. This behavior's included Visual Studio's editor and Qt's Creator through Intellisense and ?clangd? respectively. If not CppCheck, then is there a plugin that performs similarily to Intellisense?
Win X / wxWidgets-3.1.5
Code::Blocks 20.03

oBFusCATed

CppCheck is a static analyzer, a linter. It detects certain patterns which are questionable or buggy.

If you compile your project you'll probably get an error. Such errors are reported by the compiler.
I suppose visual studio and qtcreator provide fix-me-s, C::B currently doesn't.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

fmc0501

It aint really necessary anyhow. Just kind of neat to have errors caught on the fly. That's all.

Thanks for your answer, oBFusCATed.
Win X / wxWidgets-3.1.5
Code::Blocks 20.03