Compile time error if unused code present

Hi ,

Is there any settings with which I can enforce IDE to throw compile time error if any unused functions exist (JAVA source code)?
Presently it will only show warnings that variable or function is not used anywhere.


1 comment
Comment actions Permalink


no, there is no such a setting in CLion. As a matter of fact, CLion has its own mechanism for detecting the unused code. Although, note that the IDE uses the external tools to compile (GCC or Clang, as a part of the MinGW and Cygwin tool sets) and build (CMake) the source code. IDE only passes the necessary data to the compiler and the build system via the run/debug configuration parameters.The problem is that the setting that you are asking for, refers exactly to that tools, but not to the IDE. 


Please sign in to leave a comment.