<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/140673>140673</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] limiting search scope for .clang-format-ignore
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
fancl20
</td>
</tr>
</table>
<pre>
Currently `.clang-format-ignore` is searched in all parent directories, which creates a sometime unintuitive behavior: clang-format may be affected by a `.clang-format-ignore` config outside the project.
Should the search scope be limited by clang-format config or .git directory? It's difficult to notice what happened in these cases since `.clang-format-ignore` can be in any parent directory e.g. under home dir and the formatter get silently ignored.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8Us2OozgQfhpzKQU5BvJz4JDtVqQ97xMUdoFrZezILtLK248IGXX3aNQnH6z6_rEUniJRr7p_VPde4SI-5X7EaIPR1ZDco39bcqYo4QHqoGsbME67MeUZZcdTTJnUQQMXKITZenLAETAEuOF6Bo4zWUmZqSjzBh-erQebCYUKIJQ0k_BMsESOsrDwnWAgj3dOWTUX-EoIMz5gIMBxJCvkYHgA_iTLpjjyBGmRwo5APMEtp__JSq30RenLfz4twT0_Nv1QbLqtCiDwzC-Obxp-Y2aoJ_7091DNFf4VZY4FHI8j2yUISIKYhC3Bh0cBj7cbxS0j8VQILBYqUDha-tEIxlXTGm18_BntA6iealiioww-zbT-AMbN14YllGEigcJhK3PDdnXl-sadmzNW1O-P7fG4705nXfnenVpzQjuOZmgO6LpjZ21D58PgDI6NaSrujTad7ozWbXPa61q3hG6vnTFtcziTUa2mGTnUIdznOuWp4lIW6vetPhybKuBAoTynZ8xX38qYdYy5X-92wzIV1erARconkrCE52y_HXbvW20cp-99jmtdf8m2WnLovcitqOaizFWZ68Til6G2aVbmuvK9nt1rOcpcnzaKMteXk3tvfgUAAP__DoYfdg">