syncqt: Don't mention module name when printing errors/warnings

The module name is already clear from the build rule, e.g:

[17/451] Running syncqt.cpp for module: QtCore
WARNING: qtconfigmacros.h includes qconfig-bootstrapped.h when it should include QtCore/qconfig-bootstrapped.h

Change-Id: I9f306768e4f415dbdc20e58a93898cb7bdd83298
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
Tor Arne Vestbø 2022-10-03 12:21:50 +02:00
parent 3165bb8da2
commit affb87741e

View File

@ -1126,8 +1126,7 @@ public:
.filename()
.generic_string())) {
faults |= PrivateHeaderChecks;
std::cerr << m_commandLineArgs->moduleName()
<< ": ERROR: " << m_currentFilename
std::cerr << "ERROR: " << m_currentFilename
<< " includes private header " << includedHeader << std::endl;
}
for (const auto &module : m_commandLineArgs->knownModules()) {
@ -1135,8 +1134,7 @@ public:
if (std::filesystem::exists(m_commandLineArgs->includeDir() + "/../"
+ suggestedHeader)) {
faults |= IncludeChecks;
std::cerr << m_commandLineArgs->moduleName()
<< ": WARNING: " << m_currentFilename << " includes "
std::cerr << "WARNING: " << m_currentFilename << " includes "
<< includedHeader << " when it should include "
<< suggestedHeader << std::endl;
}
@ -1192,22 +1190,21 @@ public:
if (hasQtBeginNamespace) {
if (qtBeginNamespace != qtEndNamespace) {
faults |= NamespaceChecks;
std::cerr << m_commandLineArgs->moduleName()
<< ":WARNING: " << m_currentFilename
std::cerr << "WARNING: " << m_currentFilename
<< " the begin namespace macro QT_BEGIN_NAMESPACE" << qtBeginNamespace
<< " doesn't match the end namespace macro QT_END_NAMESPACE"
<< qtEndNamespace << std::endl;
}
} else {
faults |= NamespaceChecks;
std::cerr << m_commandLineArgs->moduleName() << ": WARNING: " << m_currentFilename
std::cerr << "WARNING: " << m_currentFilename
<< " does not include QT_BEGIN_NAMESPACE" << std::endl;
}
}
if (!(skipChecks & WeMeantItChecks) && !hasWeMeantIt) {
faults |= WeMeantItChecks;
std::cerr << m_commandLineArgs->moduleName() << ": WARNING: " << m_currentFilename
std::cerr << "WARNING: " << m_currentFilename
<< " does not have the \"We mean it.\" warning"
<< std::endl;
}