<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/162037>162037</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            analyze-build: incorrect exit code when using --sarif and --status-bugs
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          correctmost
      </td>
    </tr>
</table>

<pre>
    ### Description

I get an exit code of 0 when I run `analyze-build --sarif --status-bugs` on any codebase that has analyzer warnings.  The exit code is non-zero if I use `--plist` or `--sarif-html` instead of `--sarif`.

The root cause seems to be that the bug reporting code only analyzes .plist and .html files for bug entries:
https://github.com/llvm/llvm-project/blob/dd3c26a045c081620375a878159f536758baba6e/clang/tools/scan-build-py/lib/libscanbuild/report.py#L348-L357

### Version info
clang version 20.1.8 on Arch Linux
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUU01v5CAM_TXkYiUikM9DDrOqIlXqcbV3IE7CioERkLbTX7-CTNX2uFIUIjv42e89ixD0ZhEn0v4i7VMhjrg7PynnPap4dSEW0i33iTB-PvCEQXl9i9pZQi-EXp5hwwjCAr7rCMotCG4FCm87WngGf1ggHRVWmPsHlvLQZoGyDMLrNZ1RxCOU8tgC6Sg4C8LecxUpAkLcRYRdBHjc9_AmvNV2CxXA7x2_geoA1tnyA70DvcIzHAETclnejA4xV_dnIIOXe7yaFNU2RBRL6vorSzpanfMlFO9cBCVSxYB4DRAdyEd3cUeQxwYeb85HbbcHB9bcP7sOUOUeQNgFqoQLqzYYYHU-30UbvcZAeALcY7zlTzYTNm867oeslLsSNhvz-nmUN-_-ooqEzdI4Sdi8LFyxTtCmVXSoO0Z534qhH-p2XFve9e0ghRQdEjYrI-xG2BydM4GwOShhT2nK2z0BaHm-UyLHCZvPAav0A3_hzVC-8LY_Ofqyxx_0QTsL2q6O0EsGgtdHkNGqroYk8sWrHV60Pd6LZeLLyEdR4FT37djXwziOxT4x3vX1MEi10L7px2ZkzYhcrNhy1Y39WOiJUdbWlHaUNWM7VhxV3cqFMpYoECtpKF6FNlXiq3J-K3QIB04nN4UREk3IzmfM4hvkLGEsLYKfMsnZlw1N4oWvMlFHg9MPSxN-AW0fe_PNlXkLjpBs8Wn6ZIIfxi8Ob6b_Vj13m8R7jPM6sX8BAAD__-XMOxg">