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
6 changes: 1 addition & 5 deletions cli/cmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,7 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
if (projType == ImportProject::Type::VS_SLN || projType == ImportProject::Type::VS_VCXPROJ) {
if (project.guiProject.analyzeAllVsConfigs == "false")
project.selectOneVsConfig(mSettings.platform.type);
if (!CppCheckExecutor::tryLoadLibrary(mSettings.library, argv[0], "windows.cfg")) {
// This shouldn't happen normally.
mLogger.printError("failed to load 'windows.cfg'. Your Cppcheck installation is broken. Please re-install.");
return false;
}
mSettings.libraries.emplace_back("windows");
}
if (projType == ImportProject::Type::MISSING) {
mLogger.printError("failed to open project '" + projectFile + "'. The file does not exist.");
Expand Down
10 changes: 6 additions & 4 deletions cli/cppcheckexecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class CppCheckExecutor : public ErrorLogger {
*/
int check(int argc, const char* const argv[]);

private:

/**
* Information about progress is directed here. This should be
* called by the CppCheck class only.
Expand All @@ -84,6 +86,8 @@ class CppCheckExecutor : public ErrorLogger {

void reportProgress(const std::string &filename, const char stage[], const std::size_t value) override;

public:

/**
* @param exceptionOutput Output file
*/
Expand All @@ -93,6 +97,8 @@ class CppCheckExecutor : public ErrorLogger {
*/
static FILE* getExceptionOutput();

private:

/**
* Tries to load a library and prints warning/error messages
* @return false, if an error occurred (except unknown XML elements)
Expand All @@ -104,8 +110,6 @@ class CppCheckExecutor : public ErrorLogger {
*/
static int executeCommand(std::string exe, std::vector<std::string> args, std::string redirect, std::string &output_);

protected:

/**
* Helper function to print out errors. Appends a line change.
* @param errmsg String printed to error stream
Expand All @@ -123,8 +127,6 @@ class CppCheckExecutor : public ErrorLogger {
*/
bool parseFromArgs(Settings &settings, int argc, const char* const argv[]);

private:

static bool reportSuppressions(const Settings &settings, bool unusedFunctionCheckEnabled, const std::map<std::string, std::size_t> &files, ErrorLogger& errorLogger);

/**
Expand Down