34 : mFiles(files), mFileSettings(fileSettings), mSettings(settings), mSuppressions(suppressions), mErrorLogger(errorLogger)
37 assert(!(!files.empty() && !fileSettings.empty()));
54 if (
mErrorList.emplace(std::move(errmsg)).second) {
61 void Executor::reportStatus(std::size_t fileindex, std::size_t filecount, std::size_t sizedone, std::size_t sizetotal)
64 std::ostringstream oss;
65 const unsigned long percentDone = (sizetotal > 0) ? (100 * sizedone) / sizetotal : 0;
66 oss << fileindex <<
'/' << filecount
67 <<
" files checked " << percentDone
This is an interface, which the class responsible of error logging should implement.
virtual void reportOut(const std::string &outmsg, Color c=Color::Reset)=0
Information about progress is directed here.
Wrapper for error messages, provided by reportErr()
std::string toString(bool verbose, const std::string &templateFormat=emptyString, const std::string &templateLocation=emptyString) const
Format the error message into a string.
std::string file0
For GUI rechecking; source file (not header)
bool hasToLog(const ErrorMessage &msg)
Check if message is being suppressed and unique.
std::unordered_set< std::string > mErrorList
Executor(const std::list< FileWithDetails > &files, const std::list< FileSettings > &fileSettings, const Settings &settings, SuppressionList &suppressions, ErrorLogger &errorLogger)
SuppressionList & mSuppressions
std::mutex mErrorListSync
void reportStatus(std::size_t fileindex, std::size_t filecount, std::size_t sizedone, std::size_t sizetotal)
Information about how many files have been checked.
ErrorLogger & mErrorLogger
const Settings & mSettings
bool reportErrors(const std::string &path) const
This is just a container for general settings so that we don't need to pass individual values to func...
bool verbose
Is –verbose given?
class for handling suppressions
bool isSuppressed(const ErrorMessage &errmsg, bool global=true)
Returns true if this message should not be shown to the user.