Skip to content

Commit 344793e

Browse files
carlosgalvezpCarlos Gálvez
andauthored
[clang-tidy][doc] Improve option docs for readability-identifier-naming (llvm#154806)
Currently it's hard to find the "general" options, since they are listed in the middle of the "specific" options. Split them into two categories so they are easier to find. This can help in adding a potential new general option in a follow-up patch. Co-authored-by: Carlos Gálvez <[email protected]>
1 parent b3baa4d commit 344793e

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ Changes in existing checks
215215

216216
- Improved :doc:`readability-identifier-naming
217217
<clang-tidy/checks/readability/identifier-naming>` check by ignoring
218-
declarations in system headers.
218+
declarations in system headers. The documentation is also improved to
219+
differentiate the general options from the specific ones.
219220

220221
- Improved :doc:`readability-qualified-auto
221222
<clang-tidy/checks/readability/qualified-auto>` check by adding the option

clang-tools-extra/docs/clang-tidy/checks/readability/identifier-naming.rst

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,21 @@ The options and their corresponding values are:
4343
- ``LowerCase`` - example: ``int i_Variable``
4444
- ``CamelCase`` - example: ``int IVariable``
4545

46-
Options
47-
-------
46+
Options summary
47+
---------------
4848

49-
The following options are described below:
49+
The available options are summarized below:
50+
51+
**General options**
5052

51-
- :option:`AbstractClassCase`, :option:`AbstractClassPrefix`, :option:`AbstractClassSuffix`, :option:`AbstractClassIgnoredRegexp`, :option:`AbstractClassHungarianPrefix`
5253
- :option:`AggressiveDependentMemberLookup`
5354
- :option:`CheckAnonFieldInParent`
55+
- :option:`GetConfigPerFile`
56+
- :option:`IgnoreMainLikeFunctions`
57+
58+
**Specific options**
59+
60+
- :option:`AbstractClassCase`, :option:`AbstractClassPrefix`, :option:`AbstractClassSuffix`, :option:`AbstractClassIgnoredRegexp`, :option:`AbstractClassHungarianPrefix`
5461
- :option:`ClassCase`, :option:`ClassPrefix`, :option:`ClassSuffix`, :option:`ClassIgnoredRegexp`, :option:`ClassHungarianPrefix`
5562
- :option:`ClassConstantCase`, :option:`ClassConstantPrefix`, :option:`ClassConstantSuffix`, :option:`ClassConstantIgnoredRegexp`, :option:`ClassConstantHungarianPrefix`
5663
- :option:`ClassMemberCase`, :option:`ClassMemberPrefix`, :option:`ClassMemberSuffix`, :option:`ClassMemberIgnoredRegexp`, :option:`ClassMemberHungarianPrefix`
@@ -66,13 +73,11 @@ The following options are described below:
6673
- :option:`EnumCase`, :option:`EnumPrefix`, :option:`EnumSuffix`, :option:`EnumIgnoredRegexp`
6774
- :option:`EnumConstantCase`, :option:`EnumConstantPrefix`, :option:`EnumConstantSuffix`, :option:`EnumConstantIgnoredRegexp`, :option:`EnumConstantHungarianPrefix`
6875
- :option:`FunctionCase`, :option:`FunctionPrefix`, :option:`FunctionSuffix`, :option:`FunctionIgnoredRegexp`
69-
- :option:`GetConfigPerFile`
7076
- :option:`GlobalConstantCase`, :option:`GlobalConstantPrefix`, :option:`GlobalConstantSuffix`, :option:`GlobalConstantIgnoredRegexp`, :option:`GlobalConstantHungarianPrefix`
7177
- :option:`GlobalConstantPointerCase`, :option:`GlobalConstantPointerPrefix`, :option:`GlobalConstantPointerSuffix`, :option:`GlobalConstantPointerIgnoredRegexp`, :option:`GlobalConstantPointerHungarianPrefix`
7278
- :option:`GlobalFunctionCase`, :option:`GlobalFunctionPrefix`, :option:`GlobalFunctionSuffix`, :option:`GlobalFunctionIgnoredRegexp`
7379
- :option:`GlobalPointerCase`, :option:`GlobalPointerPrefix`, :option:`GlobalPointerSuffix`, :option:`GlobalPointerIgnoredRegexp`, :option:`GlobalPointerHungarianPrefix`
7480
- :option:`GlobalVariableCase`, :option:`GlobalVariablePrefix`, :option:`GlobalVariableSuffix`, :option:`GlobalVariableIgnoredRegexp`, :option:`GlobalVariableHungarianPrefix`
75-
- :option:`IgnoreMainLikeFunctions`
7681
- :option:`InlineNamespaceCase`, :option:`InlineNamespacePrefix`, :option:`InlineNamespaceSuffix`, :option:`InlineNamespaceIgnoredRegexp`
7782
- :option:`LocalConstantCase`, :option:`LocalConstantPrefix`, :option:`LocalConstantSuffix`, :option:`LocalConstantIgnoredRegexp`, :option:`LocalConstantHungarianPrefix`
7883
- :option:`LocalConstantPointerCase`, :option:`LocalConstantPointerPrefix`, :option:`LocalConstantPointerSuffix`, :option:`LocalConstantPointerIgnoredRegexp`, :option:`LocalConstantPointerHungarianPrefix`
@@ -105,6 +110,12 @@ The following options are described below:
105110
- :option:`VariableCase`, :option:`VariablePrefix`, :option:`VariableSuffix`, :option:`VariableIgnoredRegexp`, :option:`VariableHungarianPrefix`
106111
- :option:`VirtualMethodCase`, :option:`VirtualMethodPrefix`, :option:`VirtualMethodSuffix`, :option:`VirtualMethodIgnoredRegexp`
107112

113+
114+
Options description
115+
-------------------
116+
117+
A detailed description of each option is presented below:
118+
108119
.. option:: AbstractClassCase
109120

110121
When defined, the check will ensure abstract class names conform to the

0 commit comments

Comments
 (0)