<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/71628>71628</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm-cov show: -include-filename-regex counterpart for -ignore-filename-regex flag
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Viranchee
</td>
</tr>
</table>
<pre>
Hi,
I am having a use case where I want to show code coverage for only a certain files of the program.
By far, my solution regex has been hacky:
To include only folders that start with SIL:
```
llvm-cov show ...
-ignore-filename-regex [A-RT-Z].* # includes only files starting with S
-ignore-filename-regex S[A-HJ-Z].* # includes files starting with SI
-ignore-filename-regex SI[A-KM-Z].* # includes files starting with SIL
```
If there is a counterpart flag for this, it would be wonderful
```
llvm-cov show ...
-include-filename-regex SIL.* # includes only files starting with SIL
```
I am willing to contribute to this as well.
This can be a good first issue. This is code for -ignore-filename-regex
[CodeCoverage.cpp](https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-cov/CodeCoverage.cpp#L897)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVE1vpDgU_DXm8gQCA91w4NAfaqV3ey-baA97M-YBnjF2yzbN9L8fGYiiTJKJMhIC2TyX61WVzawVnUKsSL4n-TFgo-u1qf4ThineIwa1bu7VgyD0QOIjiXdnYAP07CZUBwxGi8CZRZh6NAhnmJhy4DTYXk_AdYPA9Q0N6xBabUAreQcGHI1jQkErJFrQLbge4Wp0Z9gQwbLR_g4tM4QeYLiD1XJ0Qisw2OEP6JmFGlFBz_j3O0l3y5Ll_aRBKC7HBpftWi0bNBZczxxYx4yDSbgeHs-XX1aSTbw-81DK2xByfVuaiaJomQYIRae0wdDTV2zAcGFF8v0u_Pcp_J_kx4jQHRCaPlOxK5e54ZmEF3Dh8Qns44z78NcHuO9Cnj_DPM-gf__zJdDLuzKtuZhNNAjCeoP1qByaqxe7laybzXe9sN5P4WDSo2ygRpi0atC0o_wDH8KV7tvmLl-R__dt-bhPQkpf7zRwrZwR9ejQj3xHwCxMKOXK6slPcaZ8cww6rRtohbEOhLUjRjD_9yX-bHhV3ndo5ZDvD7rBw3qEIn69kvxIaNE7d7U-vfRE6KkTrh_riOuB0JNXa_2EV6O_IXeEnmqpa0JPAxPqpcZpLe1zLdc3Qk9vtqPppSi3hJZBU6VNmZYswCrZlGWWlFlGg77KMsyLJKUx5w2N04QnbVPHRdHyItu0cRuIisY0TZK4iLN8S2nEkbfNhjfbpC1ZXW9IFuPAhIw8kUibLpjFqrbJhhaBZDVKO19QlCqcFiUJpf6-MtVMvh47S7JYCuvsC4oTTmL1Kj4k_Tg3r0L7oTNznoPRyOrLJszEveBzYz8DAAD__yPZwsg">