[PATCH] D56563: [clang-tidy] add options documentation to readability-identifier-naming checker

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 11 02:02:11 PST 2019


MyDeveloperDay marked 5 inline comments as done.
MyDeveloperDay added a comment.

> I think will be good idea to create generic Case/Prefix/Suffix description to reduce size of documentation.

I'm generating this documentation via a script, using the following template, (which is why its quite repetitive), the grunt work was in making the examples which are stored in separate Option_Before.cpp/Option_After.cpp file.

This was actually my second pass, initially I called out each option individually but that made for 100's of example files, if you think this text could be generalized even more I'd be happy to regenerate it. (I'm not much of a wordsmith)

> .. option:: %name%Case
> 
>   When defined, the checker will check %desc% names conform to the
>   selected casing.
>    
> 
> .. option:: %name%Prefix
> 
>   When defined, the checker will check %desc% names will add the
>   prefixed with the given value (regardless of casing).
>    
> 
> .. option:: %name%Suffix
> 
>   When defined, the checker will check %desc% names will add the
>   suffix with the given value (regardless of casing).
>    
> 
> For example using values of:
> 
> - %name%Case of ``lower_case``
> - %name%Prefix of ``pre_``
> - %name%Suffix of ``_post``
> 
>   Identifies and/or transforms %desc% names as follows:
> 
>   Before:
> 
>   .. code-block:: c++ %before_example%
> 
>   After:
> 
>   .. code-block:: c++ %after_example%





================
Comment at: docs/clang-tidy/checks/readability-identifier-naming.rst:34
+
+    When defined, the checker will ensure abstract class names conform to the
+    selected casing.
----------------
Eugene.Zelenko wrote:
> check, please. Same in other places.
I assumed you mean replace "ensure" with "check", now I'm not sure do you mean?

A) "the checker will check"
B) "the check will ensure"
C) "the check will check"



================
Comment at: docs/clang-tidy/checks/readability-identifier-naming.rst:278
+    {
+        unsigned const MyConst_array[] = {1,2,3};
+    }
----------------
Eugene.Zelenko wrote:
> Will be good idea to run Clang-format over code snippets.
so I formatted the examples but public didn't get indented, let me know if you think I've got the format wrong


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56563/new/

https://reviews.llvm.org/D56563





More information about the cfe-commits mailing list