Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: daxm on January 13, 2011, 09:05:22 am

Title: Checking for unused code (such as #include files)
Post by: daxm on January 13, 2011, 09:05:22 am
I'm new to Code::Blocks.  I skimmed the User Manual and didn't see anything that relates to checking for code that is unused/(unreachable) or for #include files that are not needed.  Does Code::Blocks have a "app" for these?
Title: Re: Checking for unused code (such as #include files)
Post by: oBFusCATed on January 13, 2011, 09:16:01 am
You can try the cppcheck plugin. It has some basic checks for unused/unreachable code, but don't expect miracles.
Title: Re: Checking for unused code (such as #include files)
Post by: Jenna on January 13, 2011, 09:43:50 am
You can try the cppcheck plugin. It has some basic checks for unused/unreachable code, but don't expect miracles.


Butr be aware, that the cppcheck executable is not shipped with C::B, you have to download and install it seperately.
Make sure it is in your systempath if you are on windows.