Code::Blocks Forums

User forums => Help => Topic started by: fmc0501 on August 15, 2020, 02:04:19 am

Title: CppCheck not working?
Post by: fmc0501 on August 15, 2020, 02:04:19 am
I installed cppcheck using
Code
sudo apt install cppcheck
and restarted C::B.

Checked to make sure CppCheck loaded, then opened a console program and removed
Code
 using namespace std;
and added
Code
 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?
Title: Re: CppCheck not working?
Post by: oBFusCATed on August 15, 2020, 07:45:05 am
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.
Title: Re: CppCheck not working?
Post by: fmc0501 on August 16, 2020, 12:28:12 am
It aint really necessary anyhow. Just kind of neat to have errors caught on the fly. That's all.

Thanks for your answer, oBFusCATed.