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

    <tr>
        <th>Summary</th>
        <td>
            [clang-tidy] Run `run-clang-tidy` and `clang-tidy-diff` scripts in parallel implicitly
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            enhancement,
            clang-tools-extra,
            clang-tidy
      </td>
    </tr>

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

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

<pre>
    When the user does not specify `-j` flag in `run-clang-tidy` or `clang-tidy-diff` it would be better to run in parallel.
>From my experience, other linters try to run in parallel by default, for example `cargo clippy`, `golangci-lint`, `revive`.

I think we should add implicit call to `multiprocessing.cpu_count()` in `run-clang-tidy` and `clang-tidy-diff` and use that number if user didn't specify `-j` explicitly.


</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUkruO2zwQhZ-GagYyaOpiq1Cx_y4M_G2alAEvI4kbihTIodd6-4COg02C3SKVgDkazplvjkzJzh5xZN1_rHupZKYlxPGqrlZTiJUKZh-_LuiBFoScMIIJmMAHgrShttMOrOf1K-s5TE7OYH0pxOxr7aSfa7JmL2KIpf5eq42dpiJYgreQnQGFoJAII1CAmH15apNROofuwPjTJYYV1h3wtmG06DUy8QyBFozgrCeMCSjuH3SD2sHgJLOj0jKFCHiT6-bw7knGOYB2dtuK0_IH6_kcilVt6_L0ezni1V6R9bw4Yvzpf6DF-u_whpCW-xrSGLDr5qy2BFo6Vwyxnq_Zkd1i0JiS9fNBb_mbDtkTE2cmhjuKT9hJbz6BV5ScEGiRBD6vCiPY6XEoazwTpw8Ohbef9tz-2KIyY2OGZpAVjsdTJ9rh1Denahkb07T8JM_NZPTU6VarSZ5FZ1Q7NYNSprKj4KLjp2N7FF3TnQ5D33dcqWM3YMubYWAtx1Vad3Duuh5CnCubUsbx2J570VZOKnTpHj8h0C_Sa1yxQBFMPDMhHkuH4FKNN4ryb6UwEqKEN45lRq3ynFjLnU2U3qeSJXeP-W9t3Qt8yf_MPOloN0p_BOzXwd1e5ejGhWhLrHli4sLEZba0ZHXQYWXiUgw9PvUWwytqYuJyZ5KYuDywXEfxIwAA__8U1C35">