mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-04 04:03:22 +03:00
cpplint: only print diagnostics to console if there are errors
Fixes: #18781
This commit is contained in:
1 parent
6092a770f6
commit
c834c47dfc
1 file changed
+6
-3
+6
-3
@@ -270,9 +270,12 @@ static int HandleCppLint(const std::string& runCmd,
|
||||
<< "\n";
|
||||
return 1;
|
||||
}
|
||||
std::cerr << "Warning: cpplint diagnostics:\n";
|
||||
// Output the output from cpplint to stderr
|
||||
std::cerr << stdOut;
|
||||
if (!stdOut.empty()) {
|
||||
std::cerr << "Warning: cpplint diagnostics:\n";
|
||||
// Output the output from cpplint to stderr
|
||||
std::cerr << stdOut;
|
||||
}
|
||||
|
||||
// always return 0 so the build can continue as cpplint returns non-zero
|
||||
// for any warning
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user