|
Cppcheck
|
This class will take a list of filenames and settings and check then all files using threads. More...
#include <processexecutor.h>
Public Member Functions | |
| ProcessExecutor (const std::list< FileWithDetails > &files, const std::list< FileSettings > &fileSettings, const Settings &settings, SuppressionList &suppressions, ErrorLogger &errorLogger, CppCheck::ExecuteCmdFn executeCommand) | |
| ProcessExecutor (const ProcessExecutor &)=delete | |
| ProcessExecutor & | operator= (const ProcessExecutor &)=delete |
| unsigned int | check () override |
Public Member Functions inherited from Executor | |
| Executor (const std::list< FileWithDetails > &files, const std::list< FileSettings > &fileSettings, const Settings &settings, SuppressionList &suppressions, ErrorLogger &errorLogger) | |
| virtual | ~Executor ()=default |
| Executor (const Executor &)=delete | |
| Executor & | operator= (const Executor &)=delete |
| 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. More... | |
Private Member Functions | |
| bool | handleRead (int rpipe, unsigned int &result, const std::string &filename) |
| Read from the pipe, parse and handle what ever is in there. More... | |
| bool | checkLoadAverage (size_t nchildren) |
| Check load average condition. More... | |
| void | reportInternalChildErr (const std::string &childname, const std::string &msg) |
| Reports internal errors related to child processes. More... | |
Private Attributes | |
| CppCheck::ExecuteCmdFn | mExecuteCommand |
Additional Inherited Members | |
Protected Member Functions inherited from Executor | |
| bool | hasToLog (const ErrorMessage &msg) |
| Check if message is being suppressed and unique. More... | |
Protected Attributes inherited from Executor | |
| const std::list< FileWithDetails > & | mFiles |
| const std::list< FileSettings > & | mFileSettings |
| const Settings & | mSettings |
| SuppressionList & | mSuppressions |
| ErrorLogger & | mErrorLogger |
This class will take a list of filenames and settings and check then all files using threads.
Definition at line 43 of file processexecutor.h.
| ProcessExecutor::ProcessExecutor | ( | const std::list< FileWithDetails > & | files, |
| const std::list< FileSettings > & | fileSettings, | ||
| const Settings & | settings, | ||
| SuppressionList & | suppressions, | ||
| ErrorLogger & | errorLogger, | ||
| CppCheck::ExecuteCmdFn | executeCommand | ||
| ) |
Definition at line 66 of file processexecutor.cpp.
References Settings::jobs, and Executor::mSettings.
|
delete |
|
overridevirtual |
Implements Executor.
Definition at line 231 of file processexecutor.cpp.
References CppCheck::analyseClangTidy(), CppCheck::check(), checkLoadAverage(), Settings::clangTidy, handleRead(), Settings::jobs, mExecuteCommand, Executor::mFiles, Executor::mFileSettings, Executor::mSettings, CppCheck::printTimerResults(), Settings::quiet, reportInternalChildErr(), Executor::reportStatus(), CppCheck::settings(), Settings::showtime, SHOWTIME_SUMMARY, and SHOWTIME_TOP5_SUMMARY.
Referenced by CppCheckExecutor::check_internal().
|
private |
Check load average condition.
| nchildren | - count of currently ran children |
Definition at line 209 of file processexecutor.cpp.
References Settings::loadAverage, and Executor::mSettings.
Referenced by check().
|
private |
Read from the pipe, parse and handle what ever is in there.
Definition at line 129 of file processexecutor.cpp.
References ErrorMessage::deserialize(), InternalError::errorMessage, Executor::hasToLog(), Executor::mErrorLogger, ErrorLogger::reportErr(), and ErrorLogger::reportOut().
Referenced by check().
|
delete |
|
private |
Reports internal errors related to child processes.
| msg | The error message |
Definition at line 393 of file processexecutor.cpp.
References emptyString, error, SuppressionList::isSuppressed(), Executor::mErrorLogger, Executor::mSuppressions, normal, and ErrorLogger::reportErr().
Referenced by check().
|
private |
Definition at line 71 of file processexecutor.h.
Referenced by check().