[clang] [clang] Improve CI output when trailing whitespace is found (PR #66649)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 07:02:48 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

<details>
<summary>Changes</summary>

Fixes #<!-- -->66468
---
Full diff: https://github.com/llvm/llvm-project/pull/66649.diff


1 Files Affected:

- (modified) clang/utils/ci/run-buildbot (+5-1) 


``````````diff
diff --git a/clang/utils/ci/run-buildbot b/clang/utils/ci/run-buildbot
index d117fccc7e3fbd8..f47ffb5cbd38dcd 100755
--- a/clang/utils/ci/run-buildbot
+++ b/clang/utils/ci/run-buildbot
@@ -70,7 +70,11 @@ ninja --version
 
 case "${BUILDER}" in
 check-format)
-    ! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs
+    echo "*** Checking for trailing whitespace left in Clang source files ***"
+    if grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs; then
+        echo "*** Trailing whitespace has been found in Clang source files as described above ***"
+        exit 1
+    fi
 ;;
 build-clang)
     mkdir install

``````````

</details>


https://github.com/llvm/llvm-project/pull/66649


More information about the cfe-commits mailing list