[clang] [clang-format] Add --fail-on-incomplete-format. (PR #84346)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 12:42:47 PST 2024


================
@@ -535,6 +541,9 @@ static bool format(StringRef FileName) {
       Rewrite.getEditBuffer(ID).write(outs());
     }
   }
+  if (ErrorOnIncompleteFormat && !Status.FormatComplete)
+    return true;
+
   return false;
----------------
HazardyKnusperkeks wrote:

```suggestion
  return ErrorOnIncompleteFormat && !Status.FormatComplete;
```

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


More information about the cfe-commits mailing list