Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ cli/executor.o: cli/executor.cpp cli/executor.h lib/addoninfo.h lib/checkers.h l
cli/filelister.o: cli/filelister.cpp cli/filelister.h lib/config.h lib/filesettings.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/standards.h lib/utils.h
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/filelister.cpp

cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/config.h lib/errortypes.h lib/filesettings.h lib/mathlib.h lib/path.h lib/platform.h lib/standards.h
cli/main.o: cli/main.cpp cli/cppcheckexecutor.h lib/config.h lib/filesettings.h lib/mathlib.h lib/path.h lib/platform.h lib/standards.h
$(CXX) ${INCLUDE_FOR_CLI} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ cli/main.cpp

cli/processexecutor.o: cli/processexecutor.cpp cli/executor.h cli/processexecutor.h lib/addoninfo.h lib/check.h lib/checkers.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h
Expand Down
27 changes: 1 addition & 26 deletions cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,8 @@
* When errors are found, they are reported back to the CppCheckExecutor through the ErrorLogger interface.
*/


#include "cppcheckexecutor.h"

#ifdef NDEBUG
#include "errortypes.h"

#include <cstdlib>
#include <exception>
#include <iostream>
#endif

/**
* Main function of cppcheck
*
Expand All @@ -82,21 +73,5 @@ int main(int argc, char* argv[])
#endif

CppCheckExecutor exec;

// *INDENT-OFF*
#ifdef NDEBUG
try {
#endif
return exec.check(argc, argv);
#ifdef NDEBUG
} catch (const InternalError& e) {
std::cout << e.errorMessage << std::endl;
} catch (const std::exception& error) {
std::cout << error.what() << std::endl;
} catch (...) {
std::cout << "Unknown exception" << std::endl;
}
return EXIT_FAILURE;
#endif
// *INDENT-ON*
return exec.check(argc, argv);
}
Loading