Merge topic 'cpplint-no-output-no-warning'

c834c47dfc cpplint: only print diagnostics to console if there are errors

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2788
This commit is contained in:
Brad King
2019-01-14 14:14:09 +00:00
committed by Kitware Robot
+6 -3
View File
@@ -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;