From adc116d0eff8b0a33f18f0a9b14d44d755682240 Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Mon, 19 Jan 2009 19:00:36 +0000 Subject: [PATCH] Changed output of the program to print out the file name before preprocessor. --- src/cppcheck.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cppcheck.cpp b/src/cppcheck.cpp index 2835b43c6..5e069f659 100644 --- a/src/cppcheck.cpp +++ b/src/cppcheck.cpp @@ -148,6 +148,8 @@ unsigned int CppCheck::check() _errout.str(""); std::string fname = _filenames[c]; + if (_settings._errorsOnly == false) + _errorLogger->reportOut(std::string("Checking ") + fname + std::string("...")); Preprocessor preprocessor; std::list configurations; @@ -182,7 +184,7 @@ unsigned int CppCheck::check() std::string codeWithoutCfg = Preprocessor::getcode(filedata, *it); // If only errors are printed, print filename after the check - if (_settings._errorsOnly == false) + if (_settings._errorsOnly == false && it != configurations.begin()) _errorLogger->reportOut(std::string("Checking ") + fname + ": " + cfg + std::string("...")); checkFile(codeWithoutCfg, _filenames[c].c_str());