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

    <tr>
        <th>Summary</th>
        <td>
            ShortNamespaceLines inconsistent between clang-tidy and clang-format
        </td>
    </tr>

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

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

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

<pre>
    With these lines in `.clang-tidy`:
```yaml
  - key: google-readability-namespace-comments.ShortNamespaceLines
    value: "10"
  - key: llvm-namespace-comment.ShortNamespaceLines
    value: "10"
```
and these settings in `.clang-format`:
```yaml
CompactNamespaces: false
NamespaceIndentation: None
FixNamespaceComments: true
ShortNamespaceLines: 10
```
I get inconsistent results from the two tools.

For example, given the configuration above, clang-tidy will complain on this code:
```C++
namespace test {
[[maybe_unused]] int constexpr i1 = 1;
[[maybe_unused]] int constexpr i2 = 1;
[[maybe_unused]] int constexpr i3 = 1;
[[maybe_unused]] int constexpr i4 = 1;
[[maybe_unused]] int constexpr i5 = 1;
[[maybe_unused]] int constexpr i6 = 1;
[[maybe_unused]] int constexpr i7 = 1;
[[maybe_unused]] int constexpr i8 = 1;
[[maybe_unused]] int constexpr i9 = 1;
}
```
But clang-format will not fix it, even though both specify `10` as the threshold.

In addition, clang-format seems to not include empty lines in the count while clang-tidy does.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVc9vqzgQ_mvMZZTI2CFpDhzaRpEqrd5lD3tcGTyAd40H4aFJ_vuVSZr2vUZaPSRLCeP55hfffJgYXRsQS1G8iOKQmYk7Gkvj8Uye2qwieyn_ctwBdxgRvAsYwQUQW7muvQntip29iK0U-lnIg5DP6f98Lqb3VxPACv7Fi9DP0BK1HlcjGmsq5x1fVsH0GAdT46qmvsfAcf1nRyP_-LD_kZJ-RAJ4N37CFEsolUuh1Lck3r_338Muinrv5vpogr1NIiKzC-0vw2ho7A3_zzheqR9M_VlJTGkb4yNe7-8Xb8FiYMOOQnL5QeHmcXTnu9PrbWjJg8fp5vGoV_0MuXzY1hu0yOBCTSG6yBgYRoyT5wjNSH1qGfhEwEQ-rm8hrpXQCHg2_eBRqFdo3TuG2b2m0Lh2GufqwVT0Pjt8cgZOznuoqR-8cQEowVyEmix-H96rUC_pzNb7mwXGyCB2N_vM4ZfeXCr8ewpTRCuKgygO4AKneiLjeRjB5SD0AXKhfxOnFuL0QtxmIa5YiNsuxO0W4p4W4va_4naHh6x-mRi-ruWVcYEYGncGx4mPeOUrTW0HFXEHccDaNZe003kKBSZe6d-NGDvy9if6vwUw1rp5Q-_svmWLiH0EpjmjC7WfLAL2A18-ZfS6KVNgOHXO49f1sIQfq5bZUtu93psMy3z7VGyLQuU660rbyCrf4WbzVOiqMk2-r-p6b_YSLZqnncpcqaTScitzlWut9Vrqxhptiz1WclPVVmwk9sb5ddLMNY1t5mKcsNxqud1l3lTo4_xxUCrgCebLJI7FIRvLWWerqY1iI72LHD-jsGOP5QMV-lllKuQTYvjad5LYr3PMptGXHfOQBEyoo1DH1nE3VeuaeqGOKeXtZzWM9A_WLNRxLjQKdZwb-S8AAP__gn0qBw">