================
@@ -754,7 +773,8 @@ int clangTidyMain(int argc, const char **argv) {
unsigned WErrorCount = 0;
handleErrors(Errors, Context, DisableFixes ? FB_NoFix : Behaviour,
- WErrorCount, BaseFS);
+ WErrorCount, BaseFS, SarifOS.get(),
+ SarifOS && SarifExport == "-");
----------------
zeyi2 wrote:
Thanks for handling the regular text diagnostics when SARIF owns stdout!
Sorry that I missed a similar case before. There is still another output
conflict with `--export-fixes=-`:
```cpp
struct A { A(int) {} };
```
```
clang-tidy -checks='-*,google-explicit-constructor' \
-sarif-export=- -export-fixes=- input.cpp -- > output.txt
```
This exits with code 0, but `output.txt` contains both YAML and JSON.
Could we reject this combination before running the checks, or otherwise ensure
only one exporter writes to stdout?
https://github.com/llvm/llvm-project/pull/219182
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits