<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJztWt2P2zYM_2tyL4KC-CO55CEP_dgBBYbuZcCwp0KWmVitbLmSnLvsrx9lO47t2Ilz7Tpga5HmLJH8kZJIiZQTqfi4_T0BAi85cMusUBkRhtiEWaIyecQnIBk8E54A_0KehZQkAsLiGOKZ_45EhSUMvzOeELUjCtl1xWuIyEppKYwle7AkVbHYCYgJM-QZpJwT8kcCGfng4ErWSslstUBW0Jn4C2jKuFbUKgpZkSLFKf1QwjkBBNyhPVI9I9hHZaGy3KgUnDkVJsv2YAjLc2CaWOXs50prHK8DMwWaztyQcdx1v5sFZDRK4yxoNGUWvJkt3s8Wp2-0o_pUzXCBH0L90rw1mflvm8eK9E6iEfR3ER_Ju3JyKkGC_zqjLYz7L7I9mQXvBrrniU3lLPgFhT4542e-_ycY_O7i5YJGxW4HmiIC7EqwXt90JHvMcRmESZnFmaqhOp03sHA6KjQVfeaUGQPaUvhaMGkc3GVvD69jUcV9UCKmGYpopanIhD0DXZAG0eg3WTQyW6VcDExKxVE15czCXuljgzlAuznWndKRwHDLqCkiLtGs2j3GqTcxceEcH02YSRqoducgQs_rWRYPBQ0jDijH-MZIrwI6YymcI2gkdrwAFT2WseP51eOU2JHykEoR4ZymuYQUsmoTc1Ps1JqccXBDnMJ3bd4aeQ3GasEtNUdjIaVlZwIMo8p0FF1jnBh9wjif2TkvRluNM7al6Qr5Bj5t4eOXRCG38gL9yLotWjfwqbgkDjvHKcgngQ5Qr03-SSqXuEox5ThY20Zr99_EwdMMZ02CBaoOoKVi8Xk6h4i3ERUuNi-0cSHQILU6p4RT9f1U4AHrTrWxeClPPEr3uOWxmf_Ey-CwSklD4cVq1xcrbs4kjBvXqCLHf3Kn8Vzj9EXfIl3ZIrIYXogHq02w2m14FO_m82UYxsHa2-y8eEO8xWIVhrXPUfptFjd-Vn2-xwBOm89pw_HfTtt65nPCzYFaFslyYzutVekUwZsqCPHBxd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4U9VlF_wZu4kNih4odCy21ibW7cex__CT97YZMimuNyuldM8nD6Q3HhP5e_M3nCZKdwu_rT0t-s_Idk-7hah8HjZv0Y-OEu3LEFD-OQb5AY8nW4XD5IFoE029nyLZ4F7ic4JYQ7F5bvH77dArH1F76_8BaBt1zi3zk8BvGKe7DmwHY8cukVpEzIucOZK71_0NsSEh3aING9SjNnYvWmAKA0GC20wsqy0XoRt3zvfurzCQfzqXwjN8-Pp18FGdK8mSyy6tdIEMvjQ2n1tjT5b6TUdnA>52962</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] add_new_check.py modifies list.rst unexpectedly
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LegalizeAdulthood
</td>
</tr>
</table>
<pre>
The expectation is that only the new check will be added, but a bunch of other checks in the list get modified as well. When I add the check `modernize-macro-to-enum`, I get the diff below. Note that some of the changes appear to be correct, such as this correction to sort order:
```
@@ -260,8 +260,8 @@ Clang-Tidy Checks
`modernize-use-using <modernize-use-using.html>`_, "Yes"
`mpi-buffer-deref <mpi-buffer-deref.html>`_, "Yes"
`mpi-type-mismatch <mpi-type-mismatch.html>`_, "Yes"
+ `objc-assert-equals <objc-assert-equals.html>`_,
`objc-avoid-nserror-init <objc-avoid-nserror-init.html>`_,
- `objc-assert-equals <objc-assert-equals.html>`_, "Yes"
`objc-dealloc-in-category <objc-dealloc-in-category.html>`_,
`objc-forbidden-subclassing <objc-forbidden-subclassing.html>`_,
`objc-missing-hash <objc-missing-hash.html>`_,
```
and this correction to a misspelled check name:
```
@@ -213,7 +212,7 @@ Clang-Tidy Checks
`llvmlibc-implementation-in-namespace <llvmlibc-implementation-in-namespace.html>`_,
`llvmlibc-restrict-system-libc-headers <llvmlibc-restrict-system-libc-headers.html>`_, "Yes"
`misc-definitions-in-headers <misc-definitions-in-headers.html>`_, "Yes"
- `misc-misleading-identifier <misc-mileading-identifier.html>`_,
+ `misc-misleading-identifier <misc-misleading-identifier.html>`_,
`misc-misplaced-const <misc-misplaced-const.html>`_,
`misc-new-delete-overloads <misc-new-delete-overloads.html>`_,
`misc-no-recursion <misc-no-recursion.html>`_,
```
Full diff:
```
diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst
index 1e6936f9cbdf..544d3819f1d9 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/list.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst
@@ -12,7 +12,7 @@ Clang-Tidy Checks
.. csv-table::
:header: "Name", "Offers fixes"
- `abseil-cleanup-ctad <abseil-cleanup-ctad.html>`_, "Yes"
+ `abseil-cleanup-ctad <abseil-cleanup-ctad.html>`_,
`abseil-duration-addition <abseil-duration-addition.html>`_, "Yes"
`abseil-duration-comparison <abseil-duration-comparison.html>`_, "Yes"
`abseil-duration-conversion-cast <abseil-duration-conversion-cast.html>`_, "Yes"
@@ -92,7 +92,7 @@ Clang-Tidy Checks
`bugprone-string-constructor <bugprone-string-constructor.html>`_, "Yes"
`bugprone-string-integer-assignment <bugprone-string-integer-assignment.html>`_, "Yes"
`bugprone-string-literal-with-embedded-nul <bugprone-string-literal-with-embedded-nul.html>`_,
- `bugprone-stringview-nullptr <bugprone-stringview-nullptr.html>`_, "Yes"
+ `bugprone-stringview-nullptr <bugprone-stringview-nullptr.html>`_,
`bugprone-suspicious-enum-usage <bugprone-suspicious-enum-usage.html>`_,
`bugprone-suspicious-include <bugprone-suspicious-include.html>`_,
`bugprone-suspicious-memory-comparison <bugprone-suspicious-memory-comparison.html>`_,
@@ -116,13 +116,12 @@ Clang-Tidy Checks
`cert-dcl50-cpp <cert-dcl50-cpp.html>`_,
`cert-dcl58-cpp <cert-dcl58-cpp.html>`_,
`cert-env33-c <cert-env33-c.html>`_,
+ `cert-err33-c <cert-err33-c.html>`_,
`cert-err34-c <cert-err34-c.html>`_,
`cert-err52-cpp <cert-err52-cpp.html>`_,
`cert-err58-cpp <cert-err58-cpp.html>`_,
`cert-err60-cpp <cert-err60-cpp.html>`_,
- `cert-exp42-c <cert-exp42-c.html>`_,
`cert-flp30-c <cert-flp30-c.html>`_,
- `cert-flp37-c <cert-flp37-c.html>`_,
`cert-mem57-cpp <cert-mem57-cpp.html>`_,
`cert-msc50-cpp <cert-msc50-cpp.html>`_,
`cert-msc51-cpp <cert-msc51-cpp.html>`_,
@@ -213,7 +212,7 @@ Clang-Tidy Checks
`llvmlibc-implementation-in-namespace <llvmlibc-implementation-in-namespace.html>`_,
`llvmlibc-restrict-system-libc-headers <llvmlibc-restrict-system-libc-headers.html>`_, "Yes"
`misc-definitions-in-headers <misc-definitions-in-headers.html>`_, "Yes"
- `misc-misleading-identifier <misc-mileading-identifier.html>`_,
+ `misc-misleading-identifier <misc-misleading-identifier.html>`_,
`misc-misplaced-const <misc-misplaced-const.html>`_,
`misc-new-delete-overloads <misc-new-delete-overloads.html>`_,
`misc-no-recursion <misc-no-recursion.html>`_,
@@ -233,6 +232,7 @@ Clang-Tidy Checks
`modernize-deprecated-headers <modernize-deprecated-headers.html>`_, "Yes"
`modernize-deprecated-ios-base-aliases <modernize-deprecated-ios-base-aliases.html>`_, "Yes"
`modernize-loop-convert <modernize-loop-convert.html>`_, "Yes"
+ `modernize-macro-to-enum <modernize-macro-to-enum.html>`_, "Yes"
`modernize-make-shared <modernize-make-shared.html>`_, "Yes"
`modernize-make-unique <modernize-make-unique.html>`_, "Yes"
`modernize-pass-by-value <modernize-pass-by-value.html>`_, "Yes"
@@ -260,8 +260,8 @@ Clang-Tidy Checks
`modernize-use-using <modernize-use-using.html>`_, "Yes"
`mpi-buffer-deref <mpi-buffer-deref.html>`_, "Yes"
`mpi-type-mismatch <mpi-type-mismatch.html>`_, "Yes"
+ `objc-assert-equals <objc-assert-equals.html>`_,
`objc-avoid-nserror-init <objc-avoid-nserror-init.html>`_,
- `objc-assert-equals <objc-assert-equals.html>`_, "Yes"
`objc-dealloc-in-category <objc-dealloc-in-category.html>`_,
`objc-forbidden-subclassing <objc-forbidden-subclassing.html>`_,
`objc-missing-hash <objc-missing-hash.html>`_,
@@ -338,13 +338,14 @@ Clang-Tidy Checks
`cert-dcl03-c <cert-dcl03-c.html>`_, `misc-static-assert <misc-static-assert.html>`_, "Yes"
`cert-dcl16-c <cert-dcl16-c.html>`_, `readability-uppercase-literal-suffix <readability-uppercase-literal-suffix.html>`_, "Yes"
`cert-dcl37-c <cert-dcl37-c.html>`_, `bugprone-reserved-identifier <bugprone-reserved-identifier.html>`_, "Yes"
- `cert-err33-c <cert-err33-c.html>`_, `bugprone-unused-return-value <bugprone-unused-return-value.html>`_,
`cert-dcl51-cpp <cert-dcl51-cpp.html>`_, `bugprone-reserved-identifier <bugprone-reserved-identifier.html>`_, "Yes"
`cert-dcl54-cpp <cert-dcl54-cpp.html>`_, `misc-new-delete-overloads <misc-new-delete-overloads.html>`_,
`cert-dcl59-cpp <cert-dcl59-cpp.html>`_, `google-build-namespaces <google-build-namespaces.html>`_,
`cert-err09-cpp <cert-err09-cpp.html>`_, `misc-throw-by-value-catch-by-reference <misc-throw-by-value-catch-by-reference.html>`_,
`cert-err61-cpp <cert-err61-cpp.html>`_, `misc-throw-by-value-catch-by-reference <misc-throw-by-value-catch-by-reference.html>`_,
+ `cert-exp42-c <cert-exp42-c.html>`_, `bugprone-suspicious-memory-comparison <bugprone-suspicious-memory-comparison.html>`_,
`cert-fio38-c <cert-fio38-c.html>`_, `misc-non-copyable-objects <misc-non-copyable-objects.html>`_,
+ `cert-flp37-c <cert-flp37-c.html>`_, `bugprone-suspicious-memory-comparison <bugprone-suspicious-memory-comparison.html>`_,
`cert-msc30-c <cert-msc30-c.html>`_, `cert-msc50-cpp <cert-msc50-cpp.html>`_,
`cert-msc32-c <cert-msc32-c.html>`_, `cert-msc51-cpp <cert-msc51-cpp.html>`_,
`cert-oop11-cpp <cert-oop11-cpp.html>`_, `performance-move-constructor-init <performance-move-constructor-init.html>`_,
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztWluP47YO_jWZF0GBL0kmecjDXjpAgaLnpUDRp4UsMbFa2XIlOTPprz-UnTi2YyfO7J4eoN1FNmOL5EdKJkVSTqLFcftLCgTeCuCOOalzIi1xKXNE5-qIV0ByeCU8Bf4HeZVKkQQIEwLELPpEktIRht85T4neEY3spua1ROaVtJLWkT04kmkhdxIEYZa8glJzQn5NISc_eriKtVYyWwXICiaXfwHNGDeaOk0hLzOkeKU_VnBeAAF3aI_Srwj2s3ZQW251Bt6cGpPle7CEFQUwQ5z29nNtDM7Xg9kSTWd-yjjv07hfBWS02uAqGDRlFn-YBZ9nwfkb7ag_9e0iwA-hUWXemsyij81lTfqk0Aj6ixRH8qlanFqQ4L_ObEvr_8t8T2bxp4HheeoyNYt_QKEv3vhZFP0GFr-7eIWkSbnbgaGIALsKrDc2HckdC3wM0mbM4UqdoDqDd7BwOWo0nfzOKbMWjKPwZ8mU9XDXoz28jkU190FLQXMUMdpQmUt3AboiDaLRr7JoZLUqOQFMKc1RNeXMwV6bY4M5QLs71502icRwy6ktE67QrJN7jFPvYuKD83w0ZTZtoNqDgwg9r2e5GAoaRjxQgfGNkV4HdM4yuETQSOyEMSp6rmInjOrLKbGj1CFTMsE1zQoFGeT1JuaX2Ku1BePgpziF79a6NfIGrDOSO2qP1kFGq8EUGEaV7Si6xTgx-qT1PrPzXoy2Wm9sS9MN8h182sLHL4VC_slL9CPnt2jTwGfymjjsHOcgnwQ6QL21-GepQuFTEpTjZF0brT1-FwezGa6aAgdUH8AozcRlOYeI9xE1PmxeGutDoEFqDU4Jp_r7pcQE67PaWLxUGY_SPW55bBa98Co4nNbKUnhzxo8Jze2FhHHjb-rIiV58Np4bXL7ka6RrW2Qu4I2EsNrEq92GJ2I3ny8XCxGvw80uFBsSBsFqsTj5HKVfZ3HjZ_XnW0zgvPmcN5zo47StZz4n3B6oY4mqNrbzs6qcIv5QByFe-Lj72W9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