Debian Codegraph @

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

raw
1 .. title:: clang-tidy - readability-identifier-naming
2
3 readability-identifier-naming
4 =============================
5
6 Checks for identifiers naming style mismatch.
7
8 This check will try to enforce coding guidelines on the identifiers naming. It
9 supports one of the following casing types and tries to convert from one to
10 another if a mismatch is detected
11
12 Casing types include:
13
14 - ``lower_case``,
15 - ``UPPER_CASE``,
16 - ``camelBack``,
17 - ``CamelCase``,
18 - ``camel_Snake_Back``,
19 - ``Camel_Snake_Case``,
20 - ``aNy_CasE``.
21
22 It also supports a fixed prefix and suffix that will be prepended or appended
23 to the identifiers, regardless of the casing.
24
25 Many configuration options are available, in order to be able to create
26 different rules for different kinds of identifiers. In general, the rules are
27 falling back to a more generic rule if the specific case is not configured.
28
29 The naming of virtual methods is reported where they occur in the base class,
30 but not where they are overridden, as it can't be fixed locally there.
31 This also applies for pseudo-override patterns like CRTP.
32
33 Options
34 -------
35
36 The following options are described below:
37
38 - :option:`AbstractClassCase`, :option:`AbstractClassPrefix`, :option:`AbstractClassSuffix`, :option:`AbstractClassIgnoredRegexp`, :option:`AbstractClassHungarianPrefix`
39 - :option:`AggressiveDependentMemberLookup`
40 - :option:`ClassCase`, :option:`ClassPrefix`, :option:`ClassSuffix`, :option:`ClassIgnoredRegexp`, :option:`ClassHungarianPrefix`
41 - :option:`ClassConstantCase`, :option:`ClassConstantPrefix`, :option:`ClassConstantSuffix`, :option:`ClassConstantIgnoredRegexp`, :option:`ClassConstantHungarianPrefix`
42 - :option:`ClassMemberCase`, :option:`ClassMemberPrefix`, :option:`ClassMemberSuffix`, :option:`ClassMemberIgnoredRegexp`, :option:`ClassMemberHungarianPrefix`
43 - :option:`ClassMethodCase`, :option:`ClassMethodPrefix`, :option:`ClassMethodSuffix`, :option:`ClassMethodIgnoredRegexp`
44 - :option:`ConstantCase`, :option:`ConstantPrefix`, :option:`ConstantSuffix`, :option:`ConstantIgnoredRegexp`, :option:`ConstantHungarianPrefix`
45 - :option:`ConstantMemberCase`, :option:`ConstantMemberPrefix`, :option:`ConstantMemberSuffix`, :option:`ConstantMemberIgnoredRegexp`, :option:`ConstantMemberHungarianPrefix`
46 - :option:`ConstantParameterCase`, :option:`ConstantParameterPrefix`, :option:`ConstantParameterSuffix`, :option:`ConstantParameterIgnoredRegexp`, :option:`ConstantParameterHungarianPrefix`
47 - :option:`ConstantPointerParameterCase`, :option:`ConstantPointerParameterPrefix`, :option:`ConstantPointerParameterSuffix`, :option:`ConstantPointerParameterIgnoredRegexp`, :option:`ConstantPointerParameterHungarianPrefix`
48 - :option:`ConstexprFunctionCase`, :option:`ConstexprFunctionPrefix`, :option:`ConstexprFunctionSuffix`, :option:`ConstexprFunctionIgnoredRegexp`
49 - :option:`ConstexprMethodCase`, :option:`ConstexprMethodPrefix`, :option:`ConstexprMethodSuffix`, :option:`ConstexprMethodIgnoredRegexp`
50 - :option:`ConstexprVariableCase`, :option:`ConstexprVariablePrefix`, :option:`ConstexprVariableSuffix`, :option:`ConstexprVariableIgnoredRegexp`, :option:`ConstexprVariableHungarianPrefix`
51 - :option:`EnumCase`, :option:`EnumPrefix`, :option:`EnumSuffix`, :option:`EnumIgnoredRegexp`
52 - :option:`EnumConstantCase`, :option:`EnumConstantPrefix`, :option:`EnumConstantSuffix`, :option:`EnumConstantIgnoredRegexp`, :option:`EnumConstantHungarianPrefix`
53 - :option:`FunctionCase`, :option:`FunctionPrefix`, :option:`FunctionSuffix`, :option:`FunctionIgnoredRegexp`
54 - :option:`GetConfigPerFile`
55 - :option:`GlobalConstantCase`, :option:`GlobalConstantPrefix`, :option:`GlobalConstantSuffix`, :option:`GlobalConstantIgnoredRegexp`, :option:`GlobalConstantHungarianPrefix`
56 - :option:`GlobalConstantPointerCase`, :option:`GlobalConstantPointerPrefix`, :option:`GlobalConstantPointerSuffix`, :option:`GlobalConstantPointerIgnoredRegexp`, :option:`GlobalConstantPointerHungarianPrefix`
57 - :option:`GlobalFunctionCase`, :option:`GlobalFunctionPrefix`, :option:`GlobalFunctionSuffix`, :option:`GlobalFunctionIgnoredRegexp`
58 - :option:`GlobalPointerCase`, :option:`GlobalPointerPrefix`, :option:`GlobalPointerSuffix`, :option:`GlobalPointerIgnoredRegexp`, :option:`GlobalPointerHungarianPrefix`
59 - :option:`GlobalVariableCase`, :option:`GlobalVariablePrefix`, :option:`GlobalVariableSuffix`, :option:`GlobalVariableIgnoredRegexp`, :option:`GlobalVariableHungarianPrefix`
60 - :option:`IgnoreMainLikeFunctions`
61 - :option:`InlineNamespaceCase`, :option:`InlineNamespacePrefix`, :option:`InlineNamespaceSuffix`, :option:`InlineNamespaceIgnoredRegexp`
62 - :option:`LocalConstantCase`, :option:`LocalConstantPrefix`, :option:`LocalConstantSuffix`, :option:`LocalConstantIgnoredRegexp`, :option:`LocalConstantHungarianPrefix`
63 - :option:`LocalConstantPointerCase`, :option:`LocalConstantPointerPrefix`, :option:`LocalConstantPointerSuffix`, :option:`LocalConstantPointerIgnoredRegexp`, :option:`LocalConstantPointerHungarianPrefix`
64 - :option:`LocalPointerCase`, :option:`LocalPointerPrefix`, :option:`LocalPointerSuffix`, :option:`LocalPointerIgnoredRegexp`, :option:`LocalPointerHungarianPrefix`
65 - :option:`LocalVariableCase`, :option:`LocalVariablePrefix`, :option:`LocalVariableSuffix`, :option:`LocalVariableIgnoredRegexp`, :option:`LocalVariableHungarianPrefix`
66 - :option:`MacroDefinitionCase`, :option:`MacroDefinitionPrefix`, :option:`MacroDefinitionSuffix`, :option:`MacroDefinitionIgnoredRegexp`
67 - :option:`MemberCase`, :option:`MemberPrefix`, :option:`MemberSuffix`, :option:`MemberIgnoredRegexp`, :option:`MemberHungarianPrefix`
68 - :option:`MethodCase`, :option:`MethodPrefix`, :option:`MethodSuffix`, :option:`MethodIgnoredRegexp`
69 - :option:`NamespaceCase`, :option:`NamespacePrefix`, :option:`NamespaceSuffix`, :option:`NamespaceIgnoredRegexp`
70 - :option:`ParameterCase`, :option:`ParameterPrefix`, :option:`ParameterSuffix`, :option:`ParameterIgnoredRegexp`, :option:`ParameterHungarianPrefix`
71 - :option:`ParameterPackCase`, :option:`ParameterPackPrefix`, :option:`ParameterPackSuffix`, :option:`ParameterPackIgnoredRegexp`
72 - :option:`PointerParameterCase`, :option:`PointerParameterPrefix`, :option:`PointerParameterSuffix`, :option:`PointerParameterIgnoredRegexp`, :option:`PointerParameterHungarianPrefix`
73 - :option:`PrivateMemberCase`, :option:`PrivateMemberPrefix`, :option:`PrivateMemberSuffix`, :option:`PrivateMemberIgnoredRegexp`, :option:`PrivateMemberHungarianPrefix`
74 - :option:`PrivateMethodCase`, :option:`PrivateMethodPrefix`, :option:`PrivateMethodSuffix`, :option:`PrivateMethodIgnoredRegexp`
75 - :option:`ProtectedMemberCase`, :option:`ProtectedMemberPrefix`, :option:`ProtectedMemberSuffix`, :option:`ProtectedMemberIgnoredRegexp`, :option:`ProtectedMemberHungarianPrefix`
76 - :option:`ProtectedMethodCase`, :option:`ProtectedMethodPrefix`, :option:`ProtectedMethodSuffix`, :option:`ProtectedMethodIgnoredRegexp`
77 - :option:`PublicMemberCase`, :option:`PublicMemberPrefix`, :option:`PublicMemberSuffix`, :option:`PublicMemberIgnoredRegexp`, :option:`PublicMemberHungarianPrefix`
78 - :option:`PublicMethodCase`, :option:`PublicMethodPrefix`, :option:`PublicMethodSuffix`, :option:`PublicMethodIgnoredRegexp`
79 - :option:`ScopedEnumConstantCase`, :option:`ScopedEnumConstantPrefix`, :option:`ScopedEnumConstantSuffix`, :option:`ScopedEnumConstantIgnoredRegexp`
80 - :option:`StaticConstantCase`, :option:`StaticConstantPrefix`, :option:`StaticConstantSuffix`, :option:`StaticConstantIgnoredRegexp`, :option:`StaticConstantHungarianPrefix`
81 - :option:`StaticVariableCase`, :option:`StaticVariablePrefix`, :option:`StaticVariableSuffix`, :option:`StaticVariableIgnoredRegexp`, :option:`StaticVariableHungarianPrefix`
82 - :option:`StructCase`, :option:`StructPrefix`, :option:`StructSuffix`, :option:`StructIgnoredRegexp`
83 - :option:`TemplateParameterCase`, :option:`TemplateParameterPrefix`, :option:`TemplateParameterSuffix`, :option:`TemplateParameterIgnoredRegexp`
84 - :option:`TemplateTemplateParameterCase`, :option:`TemplateTemplateParameterPrefix`, :option:`TemplateTemplateParameterSuffix`, :option:`TemplateTemplateParameterIgnoredRegexp`
85 - :option:`TypeAliasCase`, :option:`TypeAliasPrefix`, :option:`TypeAliasSuffix`, :option:`TypeAliasIgnoredRegexp`
86 - :option:`TypedefCase`, :option:`TypedefPrefix`, :option:`TypedefSuffix`, :option:`TypedefIgnoredRegexp`
87 - :option:`TypeTemplateParameterCase`, :option:`TypeTemplateParameterPrefix`, :option:`TypeTemplateParameterSuffix`, :option:`TypeTemplateParameterIgnoredRegexp`
88 - :option:`UnionCase`, :option:`UnionPrefix`, :option:`UnionSuffix`, :option:`UnionIgnoredRegexp`
89 - :option:`ValueTemplateParameterCase`, :option:`ValueTemplateParameterPrefix`, :option:`ValueTemplateParameterSuffix`, :option:`ValueTemplateParameterIgnoredRegexp`
90 - :option:`VariableCase`, :option:`VariablePrefix`, :option:`VariableSuffix`, :option:`VariableIgnoredRegexp`, :option:`VariableHungarianPrefix`
91 - :option:`VirtualMethodCase`, :option:`VirtualMethodPrefix`, :option:`VirtualMethodSuffix`, :option:`VirtualMethodIgnoredRegexp`
92
93 .. option:: AbstractClassCase
94
95 When defined, the check will ensure abstract class names conform to the
96 selected casing.
97
98 .. option:: AbstractClassPrefix
99
100 When defined, the check will ensure abstract class names will add the
101 prefixed with the given value (regardless of casing).
102
103 .. option:: AbstractClassIgnoredRegexp
104
105 Identifier naming checks won't be enforced for abstract class names
106 matching this regular expression.
107
108 .. option:: AbstractClassSuffix
109
110 When defined, the check will ensure abstract class names will add the
111 suffix with the given value (regardless of casing).
112
113 .. option:: AbstractClassHungarianPrefix
114
115 When enabled, the check ensures that the declared identifier will
116 have a Hungarian notation prefix based on the declared type.
117
118 For example using values of:
119
120 - AbstractClassCase of ``lower_case``
121 - AbstractClassPrefix of ``pre_``
122 - AbstractClassSuffix of ``_post``
123 - AbstractClassHungarianPrefix of ``On``
124
125
126 Identifies and/or transforms abstract class names as follows:
127
128 Before:
129
130 .. code-block:: c++
131
132 class ABSTRACT_CLASS {
133 public:
134 ABSTRACT_CLASS();
135 };
136
137 After:
138
139 .. code-block:: c++
140
141 class pre_abstract_class_post {
142 public:
143 pre_abstract_class_post();
144 };
145
146 .. option:: AggressiveDependentMemberLookup
147
148 When set to `true` the check will look in dependent base classes for dependent
149 member references that need changing. This can lead to errors with template
150 specializations so the default value is `false`.
151
152 For example using values of:
153
154 - ClassMemberCase of ``lower_case``
155
156 Before:
157
158 .. code-block:: c++
159
160 template <typename T>
161 struct Base {
162 T BadNamedMember;
163 };
164
165 template <typename T>
166 struct Derived : Base<T> {
167 void reset() {
168 this->BadNamedMember = 0;
169 }
170 };
171
172 After if AggressiveDependentMemberLookup is `false`:
173
174 .. code-block:: c++
175
176 template <typename T>
177 struct Base {
178 T bad_named_member;
179 };
180
181 template <typename T>
182 struct Derived : Base<T> {
183 void reset() {
184 this->BadNamedMember = 0;
185 }
186 };
187
188 After if AggressiveDependentMemberLookup is `true`:
189
190 .. code-block:: c++
191
192 template <typename T>
193 struct Base {
194 T bad_named_member;
195 };
196
197 template <typename T>
198 struct Derived : Base<T> {
199 void reset() {
200 this->bad_named_member = 0;
201 }
202 };
203
204 .. option:: ClassCase
205
206 When defined, the check will ensure class names conform to the
207 selected casing.
208
209 .. option:: ClassPrefix
210
211 When defined, the check will ensure class names will add the
212 prefixed with the given value (regardless of casing).
213
214 .. option:: ClassIgnoredRegexp
215
216 Identifier naming checks won't be enforced for class names matching
217 this regular expression.
218
219 .. option:: ClassSuffix
220
221 When defined, the check will ensure class names will add the
222 suffix with the given value (regardless of casing).
223
224 .. option:: ClassHungarianPrefix
225
226 When enabled, the check ensures that the declared identifier will
227 have a Hungarian notation prefix based on the declared type.
228
229 For example using values of:
230
231 - ClassCase of ``lower_case``
232 - ClassPrefix of ``pre_``
233 - ClassSuffix of ``_post``
234 - ClassHungarianPrefix of ``On``
235
236 Identifies and/or transforms class names as follows:
237
238 Before:
239
240 .. code-block:: c++
241
242 class FOO {
243 public:
244 FOO();
245 ~FOO();
246 };
247
248 After:
249
250 .. code-block:: c++
251
252 class pre_foo_post {
253 public:
254 pre_foo_post();
255 ~pre_foo_post();
256 };
257
258 .. option:: ClassConstantCase
259
260 When defined, the check will ensure class constant names conform to the
261 selected casing.
262
263 .. option:: ClassConstantPrefix
264
265 When defined, the check will ensure class constant names will add the
266 prefixed with the given value (regardless of casing).
267
268 .. option:: ClassConstantIgnoredRegexp
269
270 Identifier naming checks won't be enforced for class constant names
271 matching this regular expression.
272
273 .. option:: ClassConstantSuffix
274
275 When defined, the check will ensure class constant names will add the
276 suffix with the given value (regardless of casing).
277
278 .. option:: ClassConstantHungarianPrefix
279
280 When enabled, the check ensures that the declared identifier will
281 have a Hungarian notation prefix based on the declared type.
282
283 For example using values of:
284
285 - ClassConstantCase of ``lower_case``
286 - ClassConstantPrefix of ``pre_``
287 - ClassConstantSuffix of ``_post``
288 - ClassConstantHungarianPrefix of ``On``
289
290 Identifies and/or transforms class constant names as follows:
291
292 Before:
293
294 .. code-block:: c++
295
296 class FOO {
297 public:
298 static const int CLASS_CONSTANT;
299 };
300
301 After:
302
303 .. code-block:: c++
304
305 class FOO {
306 public:
307 static const int pre_class_constant_post;
308 };
309
310 .. option:: ClassMemberCase
311
312 When defined, the check will ensure class member names conform to the
313 selected casing.
314
315 .. option:: ClassMemberPrefix
316
317 When defined, the check will ensure class member names will add the
318 prefixed with the given value (regardless of casing).
319
320 .. option:: ClassMemberIgnoredRegexp
321
322 Identifier naming checks won't be enforced for class member names
323 matching this regular expression.
324
325 .. option:: ClassMemberSuffix
326
327 When defined, the check will ensure class member names will add the
328 suffix with the given value (regardless of casing).
329
330 .. option:: ClassMemberHungarianPrefix
331
332 When enabled, the check ensures that the declared identifier will
333 have a Hungarian notation prefix based on the declared type.
334
335 For example using values of:
336
337 - ClassMemberCase of ``lower_case``
338 - ClassMemberPrefix of ``pre_``
339 - ClassMemberSuffix of ``_post``
340 - ClassMemberHungarianPrefix of ``On``
341
342 Identifies and/or transforms class member names as follows:
343
344 Before:
345
346 .. code-block:: c++
347
348 class FOO {
349 public:
350 static int CLASS_CONSTANT;
351 };
352
353 After:
354
355 .. code-block:: c++
356
357 class FOO {
358 public:
359 static int pre_class_constant_post;
360 };
361
362 .. option:: ClassMethodCase
363
364 When defined, the check will ensure class method names conform to the
365 selected casing.
366
367 .. option:: ClassMethodPrefix
368
369 When defined, the check will ensure class method names will add the
370 prefixed with the given value (regardless of casing).
371
372 .. option:: ClassMethodIgnoredRegexp
373
374 Identifier naming checks won't be enforced for class method names
375 matching this regular expression.
376
377 .. option:: ClassMethodSuffix
378
379 When defined, the check will ensure class method names will add the
380 suffix with the given value (regardless of casing).
381
382 For example using values of:
383
384 - ClassMethodCase of ``lower_case``
385 - ClassMethodPrefix of ``pre_``
386 - ClassMethodSuffix of ``_post``
387
388 Identifies and/or transforms class method names as follows:
389
390 Before:
391
392 .. code-block:: c++
393
394 class FOO {
395 public:
396 int CLASS_MEMBER();
397 };
398
399 After:
400
401 .. code-block:: c++
402
403 class FOO {
404 public:
405 int pre_class_member_post();
406 };
407
408 .. option:: ConstantCase
409
410 When defined, the check will ensure constant names conform to the
411 selected casing.
412
413 .. option:: ConstantPrefix
414
415 When defined, the check will ensure constant names will add the
416 prefixed with the given value (regardless of casing).
417
418 .. option:: ConstantIgnoredRegexp
419
420 Identifier naming checks won't be enforced for constant names
421 matching this regular expression.
422
423 .. option:: ConstantSuffix
424
425 When defined, the check will ensure constant names will add the
426 suffix with the given value (regardless of casing).
427
428 .. option:: ConstantHungarianPrefix
429
430 When enabled, the check ensures that the declared identifier will
431 have a Hungarian notation prefix based on the declared type.
432
433 For example using values of:
434
435 - ConstantCase of ``lower_case``
436 - ConstantPrefix of ``pre_``
437 - ConstantSuffix of ``_post``
438 - ConstantHungarianPrefix of ``On``
439
440 Identifies and/or transforms constant names as follows:
441
442 Before:
443
444 .. code-block:: c++
445
446 void function() { unsigned const MyConst_array[] = {1, 2, 3}; }
447
448 After:
449
450 .. code-block:: c++
451
452 void function() { unsigned const pre_myconst_array_post[] = {1, 2, 3}; }
453
454 .. option:: ConstantMemberCase
455
456 When defined, the check will ensure constant member names conform to the
457 selected casing.
458
459 .. option:: ConstantMemberPrefix
460
461 When defined, the check will ensure constant member names will add the
462 prefixed with the given value (regardless of casing).
463
464 .. option:: ConstantMemberIgnoredRegexp
465
466 Identifier naming checks won't be enforced for constant member names
467 matching this regular expression.
468
469 .. option:: ConstantMemberSuffix
470
471 When defined, the check will ensure constant member names will add the
472 suffix with the given value (regardless of casing).
473
474 .. option:: ConstantMemberHungarianPrefix
475
476 When enabled, the check ensures that the declared identifier will
477 have a Hungarian notation prefix based on the declared type.
478
479 For example using values of:
480
481 - ConstantMemberCase of ``lower_case``
482 - ConstantMemberPrefix of ``pre_``
483 - ConstantMemberSuffix of ``_post``
484 - ConstantMemberHungarianPrefix of ``On``
485
486 Identifies and/or transforms constant member names as follows:
487
488 Before:
489
490 .. code-block:: c++
491
492 class Foo {
493 char const MY_ConstMember_string[4] = "123";
494 }
495
496 After:
497
498 .. code-block:: c++
499
500 class Foo {
501 char const pre_my_constmember_string_post[4] = "123";
502 }
503
504 .. option:: ConstantParameterCase
505
506 When defined, the check will ensure constant parameter names conform to the
507 selected casing.
508
509 .. option:: ConstantParameterPrefix
510
511 When defined, the check will ensure constant parameter names will add the
512 prefixed with the given value (regardless of casing).
513
514 .. option:: ConstantParameterIgnoredRegexp
515
516 Identifier naming checks won't be enforced for constant parameter names
517 matching this regular expression.
518
519 .. option:: ConstantParameterSuffix
520
521 When defined, the check will ensure constant parameter names will add the
522 suffix with the given value (regardless of casing).
523
524 .. option:: ConstantParameterHungarianPrefix
525
526 When enabled, the check ensures that the declared identifier will
527 have a Hungarian notation prefix based on the declared type.
528
529 For example using values of:
530
531 - ConstantParameterCase of ``lower_case``
532 - ConstantParameterPrefix of ``pre_``
533 - ConstantParameterSuffix of ``_post``
534 - ConstantParameterHungarianPrefix of ``On``
535
536 Identifies and/or transforms constant parameter names as follows:
537
538 Before:
539
540 .. code-block:: c++
541
542 void GLOBAL_FUNCTION(int PARAMETER_1, int const CONST_parameter);
543
544 After:
545
546 .. code-block:: c++
547
548 void GLOBAL_FUNCTION(int PARAMETER_1, int const pre_const_parameter_post);
549
550 .. option:: ConstantPointerParameterCase
551
552 When defined, the check will ensure constant pointer parameter names conform to the
553 selected casing.
554
555 .. option:: ConstantPointerParameterPrefix
556
557 When defined, the check will ensure constant pointer parameter names will add the
558 prefixed with the given value (regardless of casing).
559
560 .. option:: ConstantPointerParameterIgnoredRegexp
561
562 Identifier naming checks won't be enforced for constant pointer parameter
563 names matching this regular expression.
564
565 .. option:: ConstantPointerParameterSuffix
566
567 When defined, the check will ensure constant pointer parameter names will add the
568 suffix with the given value (regardless of casing).
569
570 .. option:: ConstantPointerParameterHungarianPrefix
571
572 When enabled, the check ensures that the declared identifier will
573 have a Hungarian notation prefix based on the declared type.
574
575 For example using values of:
576
577 - ConstantPointerParameterCase of ``lower_case``
578 - ConstantPointerParameterPrefix of ``pre_``
579 - ConstantPointerParameterSuffix of ``_post``
580 - ConstantPointerParameterHungarianPrefix of ``On``
581
582 Identifies and/or transforms constant pointer parameter names as follows:
583
584 Before:
585
586 .. code-block:: c++
587
588 void GLOBAL_FUNCTION(int const *CONST_parameter);
589
590 After:
591
592 .. code-block:: c++
593
594 void GLOBAL_FUNCTION(int const *pre_const_parameter_post);
595
596 .. option:: ConstexprFunctionCase
597
598 When defined, the check will ensure constexpr function names conform to the
599 selected casing.
600
601 .. option:: ConstexprFunctionPrefix
602
603 When defined, the check will ensure constexpr function names will add the
604 prefixed with the given value (regardless of casing).
605
606 .. option:: ConstexprFunctionIgnoredRegexp
607
608 Identifier naming checks won't be enforced for constexpr function names
609 matching this regular expression.
610
611 .. option:: ConstexprFunctionSuffix
612
613 When defined, the check will ensure constexpr function names will add the
614 suffix with the given value (regardless of casing).
615
616 For example using values of:
617
618 - ConstexprFunctionCase of ``lower_case``
619 - ConstexprFunctionPrefix of ``pre_``
620 - ConstexprFunctionSuffix of ``_post``
621
622 Identifies and/or transforms constexpr function names as follows:
623
624 Before:
625
626 .. code-block:: c++
627
628 constexpr int CE_function() { return 3; }
629
630 After:
631
632 .. code-block:: c++
633
634 constexpr int pre_ce_function_post() { return 3; }
635
636 .. option:: ConstexprMethodCase
637
638 When defined, the check will ensure constexpr method names conform to the
639 selected casing.
640
641 .. option:: ConstexprMethodPrefix
642
643 When defined, the check will ensure constexpr method names will add the
644 prefixed with the given value (regardless of casing).
645
646 .. option:: ConstexprMethodIgnoredRegexp
647
648 Identifier naming checks won't be enforced for constexpr method names
649 matching this regular expression.
650
651 .. option:: ConstexprMethodSuffix
652
653 When defined, the check will ensure constexpr method names will add the
654 suffix with the given value (regardless of casing).
655
656 For example using values of:
657
658 - ConstexprMethodCase of ``lower_case``
659 - ConstexprMethodPrefix of ``pre_``
660 - ConstexprMethodSuffix of ``_post``
661
662 Identifies and/or transforms constexpr method names as follows:
663
664 Before:
665
666 .. code-block:: c++
667
668 class Foo {
669 public:
670 constexpr int CST_expr_Method() { return 2; }
671 }
672
673 After:
674
675 .. code-block:: c++
676
677 class Foo {
678 public:
679 constexpr int pre_cst_expr_method_post() { return 2; }
680 }
681
682 .. option:: ConstexprVariableCase
683
684 When defined, the check will ensure constexpr variable names conform to the
685 selected casing.
686
687 .. option:: ConstexprVariablePrefix
688
689 When defined, the check will ensure constexpr variable names will add the
690 prefixed with the given value (regardless of casing).
691
692 .. option:: ConstexprVariableIgnoredRegexp
693
694 Identifier naming checks won't be enforced for constexpr variable names
695 matching this regular expression.
696
697 .. option:: ConstexprVariableSuffix
698
699 When defined, the check will ensure constexpr variable names will add the
700 suffix with the given value (regardless of casing).
701
702 .. option:: ConstexprVariableHungarianPrefix
703
704 When enabled, the check ensures that the declared identifier will
705 have a Hungarian notation prefix based on the declared type.
706
707 For example using values of:
708
709 - ConstexprVariableCase of ``lower_case``
710 - ConstexprVariablePrefix of ``pre_``
711 - ConstexprVariableSuffix of ``_post``
712 - ConstexprVariableHungarianPrefix of ``On``
713
714 Identifies and/or transforms constexpr variable names as follows:
715
716 Before:
717
718 .. code-block:: c++
719
720 constexpr int ConstExpr_variable = MyConstant;
721
722 After:
723
724 .. code-block:: c++
725
726 constexpr int pre_constexpr_variable_post = MyConstant;
727
728 .. option:: EnumCase
729
730 When defined, the check will ensure enumeration names conform to the
731 selected casing.
732
733 .. option:: EnumPrefix
734
735 When defined, the check will ensure enumeration names will add the
736 prefixed with the given value (regardless of casing).
737
738 .. option:: EnumIgnoredRegexp
739
740 Identifier naming checks won't be enforced for enumeration names
741 matching this regular expression.
742
743 .. option:: EnumSuffix
744
745 When defined, the check will ensure enumeration names will add the
746 suffix with the given value (regardless of casing).
747
748 For example using values of:
749
750 - EnumCase of ``lower_case``
751 - EnumPrefix of ``pre_``
752 - EnumSuffix of ``_post``
753
754 Identifies and/or transforms enumeration names as follows:
755
756 Before:
757
758 .. code-block:: c++
759
760 enum FOO { One, Two, Three };
761
762 After:
763
764 .. code-block:: c++
765
766 enum pre_foo_post { One, Two, Three };
767
768 .. option:: EnumConstantCase
769
770 When defined, the check will ensure enumeration constant names conform to the
771 selected casing.
772
773 .. option:: EnumConstantPrefix
774
775 When defined, the check will ensure enumeration constant names will add the
776 prefixed with the given value (regardless of casing).
777
778 .. option:: EnumConstantIgnoredRegexp
779
780 Identifier naming checks won't be enforced for enumeration constant names
781 matching this regular expression.
782
783 .. option:: EnumConstantSuffix
784
785 When defined, the check will ensure enumeration constant names will add the
786 suffix with the given value (regardless of casing).
787
788 .. option:: EnumConstantHungarianPrefix
789
790 When enabled, the check ensures that the declared identifier will
791 have a Hungarian notation prefix based on the declared type.
792
793 For example using values of:
794
795 - EnumConstantCase of ``lower_case``
796 - EnumConstantPrefix of ``pre_``
797 - EnumConstantSuffix of ``_post``
798 - EnumConstantHungarianPrefix of ``On``
799
800 Identifies and/or transforms enumeration constant names as follows:
801
802 Before:
803
804 .. code-block:: c++
805
806 enum FOO { One, Two, Three };
807
808 After:
809
810 .. code-block:: c++
811
812 enum FOO { pre_One_post, pre_Two_post, pre_Three_post };
813
814 .. option:: FunctionCase
815
816 When defined, the check will ensure function names conform to the
817 selected casing.
818
819 .. option:: FunctionPrefix
820
821 When defined, the check will ensure function names will add the
822 prefixed with the given value (regardless of casing).
823
824 .. option:: FunctionIgnoredRegexp
825
826 Identifier naming checks won't be enforced for function names
827 matching this regular expression.
828
829 .. option:: FunctionSuffix
830
831 When defined, the check will ensure function names will add the
832 suffix with the given value (regardless of casing).
833
834 For example using values of:
835
836 - FunctionCase of ``lower_case``
837 - FunctionPrefix of ``pre_``
838 - FunctionSuffix of ``_post``
839
840 Identifies and/or transforms function names as follows:
841
842 Before:
843
844 .. code-block:: c++
845
846 char MY_Function_string();
847
848 After:
849
850 .. code-block:: c++
851
852 char pre_my_function_string_post();
853
854 .. option:: GetConfigPerFile
855
856 When `true` the check will look for the configuration for where an
857 identifier is declared. Useful for when included header files use a
858 different style.
859 Default value is `true`.
860
861 .. option:: GlobalConstantCase
862
863 When defined, the check will ensure global constant names conform to the
864 selected casing.
865
866 .. option:: GlobalConstantPrefix
867
868 When defined, the check will ensure global constant names will add the
869 prefixed with the given value (regardless of casing).
870
871 .. option:: GlobalConstantIgnoredRegexp
872
873 Identifier naming checks won't be enforced for global constant names
874 matching this regular expression.
875
876 .. option:: GlobalConstantSuffix
877
878 When defined, the check will ensure global constant names will add the
879 suffix with the given value (regardless of casing).
880
881 .. option:: GlobalConstantHungarianPrefix
882
883 When enabled, the check ensures that the declared identifier will
884 have a Hungarian notation prefix based on the declared type.
885
886 For example using values of:
887
888 - GlobalConstantCase of ``lower_case``
889 - GlobalConstantPrefix of ``pre_``
890 - GlobalConstantSuffix of ``_post``
891 - GlobalConstantHungarianPrefix of ``On``
892
893 Identifies and/or transforms global constant names as follows:
894
895 Before:
896
897 .. code-block:: c++
898
899 unsigned const MyConstGlobal_array[] = {1, 2, 3};
900
901 After:
902
903 .. code-block:: c++
904
905 unsigned const pre_myconstglobal_array_post[] = {1, 2, 3};
906
907 .. option:: GlobalConstantPointerCase
908
909 When defined, the check will ensure global constant pointer names conform to the
910 selected casing.
911
912 .. option:: GlobalConstantPointerPrefix
913
914 When defined, the check will ensure global constant pointer names will add the
915 prefixed with the given value (regardless of casing).
916
917 .. option:: GlobalConstantPointerIgnoredRegexp
918
919 Identifier naming checks won't be enforced for global constant pointer
920 names matching this regular expression.
921
922 .. option:: GlobalConstantPointerSuffix
923
924 When defined, the check will ensure global constant pointer names will add the
925 suffix with the given value (regardless of casing).
926
927 .. option:: GlobalConstantPointerHungarianPrefix
928
929 When enabled, the check ensures that the declared identifier will
930 have a Hungarian notation prefix based on the declared type.
931
932 For example using values of:
933
934 - GlobalConstantPointerCase of ``lower_case``
935 - GlobalConstantPointerPrefix of ``pre_``
936 - GlobalConstantPointerSuffix of ``_post``
937 - GlobalConstantPointerHungarianPrefix of ``On``
938
939 Identifies and/or transforms global constant pointer names as follows:
940
941 Before:
942
943 .. code-block:: c++
944
945 int *const MyConstantGlobalPointer = nullptr;
946
947 After:
948
949 .. code-block:: c++
950
951 int *const pre_myconstantglobalpointer_post = nullptr;
952
953 .. option:: GlobalFunctionCase
954
955 When defined, the check will ensure global function names conform to the
956 selected casing.
957
958 .. option:: GlobalFunctionPrefix
959
960 When defined, the check will ensure global function names will add the
961 prefixed with the given value (regardless of casing).
962
963 .. option:: GlobalFunctionIgnoredRegexp
964
965 Identifier naming checks won't be enforced for global function names
966 matching this regular expression.
967
968 .. option:: GlobalFunctionSuffix
969
970 When defined, the check will ensure global function names will add the
971 suffix with the given value (regardless of casing).
972
973 For example using values of:
974
975 - GlobalFunctionCase of ``lower_case``
976 - GlobalFunctionPrefix of ``pre_``
977 - GlobalFunctionSuffix of ``_post``
978
979 Identifies and/or transforms global function names as follows:
980
981 Before:
982
983 .. code-block:: c++
984
985 void GLOBAL_FUNCTION(int PARAMETER_1, int const CONST_parameter);
986
987 After:
988
989 .. code-block:: c++
990
991 void pre_global_function_post(int PARAMETER_1, int const CONST_parameter);
992
993 .. option:: GlobalPointerCase
994
995 When defined, the check will ensure global pointer names conform to the
996 selected casing.
997
998 .. option:: GlobalPointerPrefix
999
1000 When defined, the check will ensure global pointer names will add the
1001 prefixed with the given value (regardless of casing).
1002
1003 .. option:: GlobalPointerIgnoredRegexp
1004
1005 Identifier naming checks won't be enforced for global pointer names
1006 matching this regular expression.
1007
1008 .. option:: GlobalPointerSuffix
1009
1010 When defined, the check will ensure global pointer names will add the
1011 suffix with the given value (regardless of casing).
1012
1013 .. option:: GlobalPointerHungarianPrefix
1014
1015 When enabled, the check ensures that the declared identifier will
1016 have a Hungarian notation prefix based on the declared type.
1017
1018 For example using values of:
1019
1020 - GlobalPointerCase of ``lower_case``
1021 - GlobalPointerPrefix of ``pre_``
1022 - GlobalPointerSuffix of ``_post``
1023 - GlobalPointerHungarianPrefix of ``On``
1024
1025 Identifies and/or transforms global pointer names as follows:
1026
1027 Before:
1028
1029 .. code-block:: c++
1030
1031 int *GLOBAL3;
1032
1033 After:
1034
1035 .. code-block:: c++
1036
1037 int *pre_global3_post;
1038
1039 .. option:: GlobalVariableCase
1040
1041 When defined, the check will ensure global variable names conform to the
1042 selected casing.
1043
1044 .. option:: GlobalVariablePrefix
1045
1046 When defined, the check will ensure global variable names will add the
1047 prefixed with the given value (regardless of casing).
1048
1049 .. option:: GlobalVariableIgnoredRegexp
1050
1051 Identifier naming checks won't be enforced for global variable names
1052 matching this regular expression.
1053
1054 .. option:: GlobalVariableSuffix
1055
1056 When defined, the check will ensure global variable names will add the
1057 suffix with the given value (regardless of casing).
1058
1059 .. option:: GlobalVariableHungarianPrefix
1060
1061 When enabled, the check ensures that the declared identifier will
1062 have a Hungarian notation prefix based on the declared type.
1063
1064 For example using values of:
1065
1066 - GlobalVariableCase of ``lower_case``
1067 - GlobalVariablePrefix of ``pre_``
1068 - GlobalVariableSuffix of ``_post``
1069 - GlobalVariableHungarianPrefix of ``On``
1070
1071 Identifies and/or transforms global variable names as follows:
1072
1073 Before:
1074
1075 .. code-block:: c++
1076
1077 int GLOBAL3;
1078
1079 After:
1080
1081 .. code-block:: c++
1082
1083 int pre_global3_post;
1084
1085 .. option:: IgnoreMainLikeFunctions
1086
1087 When set to `true` functions that have a similar signature to ``main`` or
1088 ``wmain`` won't enforce checks on the names of their parameters.
1089 Default value is `false`.
1090
1091 .. option:: InlineNamespaceCase
1092
1093 When defined, the check will ensure inline namespaces names conform to the
1094 selected casing.
1095
1096 .. option:: InlineNamespacePrefix
1097
1098 When defined, the check will ensure inline namespaces names will add the
1099 prefixed with the given value (regardless of casing).
1100
1101 .. option:: InlineNamespaceIgnoredRegexp
1102
1103 Identifier naming checks won't be enforced for inline namespaces names
1104 matching this regular expression.
1105
1106 .. option:: InlineNamespaceSuffix
1107
1108 When defined, the check will ensure inline namespaces names will add the
1109 suffix with the given value (regardless of casing).
1110
1111 For example using values of:
1112
1113 - InlineNamespaceCase of ``lower_case``
1114 - InlineNamespacePrefix of ``pre_``
1115 - InlineNamespaceSuffix of ``_post``
1116
1117 Identifies and/or transforms inline namespaces names as follows:
1118
1119 Before:
1120
1121 .. code-block:: c++
1122
1123 namespace FOO_NS {
1124 inline namespace InlineNamespace {
1125 ...
1126 }
1127 } // namespace FOO_NS
1128
1129 After:
1130
1131 .. code-block:: c++
1132
1133 namespace FOO_NS {
1134 inline namespace pre_inlinenamespace_post {
1135 ...
1136 }
1137 } // namespace FOO_NS
1138
1139 .. option:: LocalConstantCase
1140
1141 When defined, the check will ensure local constant names conform to the
1142 selected casing.
1143
1144 .. option:: LocalConstantPrefix
1145
1146 When defined, the check will ensure local constant names will add the
1147 prefixed with the given value (regardless of casing).
1148
1149 .. option:: LocalConstantIgnoredRegexp
1150
1151 Identifier naming checks won't be enforced for local constant names
1152 matching this regular expression.
1153
1154 .. option:: LocalConstantSuffix
1155
1156 When defined, the check will ensure local constant names will add the
1157 suffix with the given value (regardless of casing).
1158
1159 .. option:: LocalConstantHungarianPrefix
1160
1161 When enabled, the check ensures that the declared identifier will
1162 have a Hungarian notation prefix based on the declared type.
1163
1164 For example using values of:
1165
1166 - LocalConstantCase of ``lower_case``
1167 - LocalConstantPrefix of ``pre_``
1168 - LocalConstantSuffix of ``_post``
1169 - LocalConstantHungarianPrefix of ``On``
1170
1171 Identifies and/or transforms local constant names as follows:
1172
1173 Before:
1174
1175 .. code-block:: c++
1176
1177 void foo() { int const local_Constant = 3; }
1178
1179 After:
1180
1181 .. code-block:: c++
1182
1183 void foo() { int const pre_local_constant_post = 3; }
1184
1185 .. option:: LocalConstantPointerCase
1186
1187 When defined, the check will ensure local constant pointer names conform to the
1188 selected casing.
1189
1190 .. option:: LocalConstantPointerPrefix
1191
1192 When defined, the check will ensure local constant pointer names will add the
1193 prefixed with the given value (regardless of casing).
1194
1195 .. option:: LocalConstantPointerIgnoredRegexp
1196
1197 Identifier naming checks won't be enforced for local constant pointer names
1198 matching this regular expression.
1199
1200 .. option:: LocalConstantPointerSuffix
1201
1202 When defined, the check will ensure local constant pointer names will add the
1203 suffix with the given value (regardless of casing).
1204
1205 .. option:: LocalConstantPointerHungarianPrefix
1206
1207 When enabled, the check ensures that the declared identifier will
1208 have a Hungarian notation prefix based on the declared type.
1209
1210 For example using values of:
1211
1212 - LocalConstantPointerCase of ``lower_case``
1213 - LocalConstantPointerPrefix of ``pre_``
1214 - LocalConstantPointerSuffix of ``_post``
1215 - LocalConstantPointerHungarianPrefix of ``On``
1216
1217 Identifies and/or transforms local constant pointer names as follows:
1218
1219 Before:
1220
1221 .. code-block:: c++
1222
1223 void foo() { int const *local_Constant = 3; }
1224
1225 After:
1226
1227 .. code-block:: c++
1228
1229 void foo() { int const *pre_local_constant_post = 3; }
1230
1231 .. option:: LocalPointerCase
1232
1233 When defined, the check will ensure local pointer names conform to the
1234 selected casing.
1235
1236 .. option:: LocalPointerPrefix
1237
1238 When defined, the check will ensure local pointer names will add the
1239 prefixed with the given value (regardless of casing).
1240
1241 .. option:: LocalPointerIgnoredRegexp
1242
1243 Identifier naming checks won't be enforced for local pointer names
1244 matching this regular expression.
1245
1246 .. option:: LocalPointerSuffix
1247
1248 When defined, the check will ensure local pointer names will add the
1249 suffix with the given value (regardless of casing).
1250
1251 .. option:: LocalPointerHungarianPrefix
1252
1253 When enabled, the check ensures that the declared identifier will
1254 have a Hungarian notation prefix based on the declared type.
1255
1256 For example using values of:
1257
1258 - LocalPointerCase of ``lower_case``
1259 - LocalPointerPrefix of ``pre_``
1260 - LocalPointerSuffix of ``_post``
1261 - LocalPointerHungarianPrefix of ``On``
1262
1263 Identifies and/or transforms local pointer names as follows:
1264
1265 Before:
1266
1267 .. code-block:: c++
1268
1269 void foo() { int *local_Constant; }
1270
1271 After:
1272
1273 .. code-block:: c++
1274
1275 void foo() { int *pre_local_constant_post; }
1276
1277 .. option:: LocalVariableCase
1278
1279 When defined, the check will ensure local variable names conform to the
1280 selected casing.
1281
1282 .. option:: LocalVariablePrefix
1283
1284 When defined, the check will ensure local variable names will add the
1285 prefixed with the given value (regardless of casing).
1286
1287 .. option:: LocalVariableIgnoredRegexp
1288
1289 Identifier naming checks won't be enforced for local variable names
1290 matching this regular expression.
1291
1292 For example using values of:
1293
1294 - LocalVariableCase of ``CamelCase``
1295 - LocalVariableIgnoredRegexp of ``\w{1,2}``
1296
1297 Will exclude variables with a length less than or equal to 2 from the
1298 camel case check applied to other variables.
1299
1300 .. option:: LocalVariableSuffix
1301
1302 When defined, the check will ensure local variable names will add the
1303 suffix with the given value (regardless of casing).
1304
1305 .. option:: LocalVariableHungarianPrefix
1306
1307 When enabled, the check ensures that the declared identifier will
1308 have a Hungarian notation prefix based on the declared type.
1309
1310 For example using values of:
1311
1312 - LocalVariableCase of ``lower_case``
1313 - LocalVariablePrefix of ``pre_``
1314 - LocalVariableSuffix of ``_post``
1315 - LocalVariableHungarianPrefix of ``On``
1316
1317 Identifies and/or transforms local variable names as follows:
1318
1319 Before:
1320
1321 .. code-block:: c++
1322
1323 void foo() { int local_Constant; }
1324
1325 After:
1326
1327 .. code-block:: c++
1328
1329 void foo() { int pre_local_constant_post; }
1330
1331 .. option:: MacroDefinitionCase
1332
1333 When defined, the check will ensure macro definitions conform to the
1334 selected casing.
1335
1336 .. option:: MacroDefinitionPrefix
1337
1338 When defined, the check will ensure macro definitions will add the
1339 prefixed with the given value (regardless of casing).
1340
1341 .. option:: MacroDefinitionIgnoredRegexp
1342
1343 Identifier naming checks won't be enforced for macro definitions
1344 matching this regular expression.
1345
1346 .. option:: MacroDefinitionSuffix
1347
1348 When defined, the check will ensure macro definitions will add the
1349 suffix with the given value (regardless of casing).
1350
1351 For example using values of:
1352
1353 - MacroDefinitionCase of ``lower_case``
1354 - MacroDefinitionPrefix of ``pre_``
1355 - MacroDefinitionSuffix of ``_post``
1356
1357 Identifies and/or transforms macro definitions as follows:
1358
1359 Before:
1360
1361 .. code-block:: c
1362
1363 #define MY_MacroDefinition
1364
1365 After:
1366
1367 .. code-block:: c
1368
1369 #define pre_my_macro_definition_post
1370
1371 Note: This will not warn on builtin macros or macros defined on the command line
1372 using the ``-D`` flag.
1373
1374 .. option:: MemberCase
1375
1376 When defined, the check will ensure member names conform to the
1377 selected casing.
1378
1379 .. option:: MemberPrefix
1380
1381 When defined, the check will ensure member names will add the
1382 prefixed with the given value (regardless of casing).
1383
1384 .. option:: MemberIgnoredRegexp
1385
1386 Identifier naming checks won't be enforced for member names
1387 matching this regular expression.
1388
1389 .. option:: MemberSuffix
1390
1391 When defined, the check will ensure member names will add the
1392 suffix with the given value (regardless of casing).
1393
1394 .. option:: MemberHungarianPrefix
1395
1396 When enabled, the check ensures that the declared identifier will
1397 have a Hungarian notation prefix based on the declared type.
1398
1399 For example using values of:
1400
1401 - MemberCase of ``lower_case``
1402 - MemberPrefix of ``pre_``
1403 - MemberSuffix of ``_post``
1404 - MemberHungarianPrefix of ``On``
1405
1406 Identifies and/or transforms member names as follows:
1407
1408 Before:
1409
1410 .. code-block:: c++
1411
1412 class Foo {
1413 char MY_ConstMember_string[4];
1414 }
1415
1416 After:
1417
1418 .. code-block:: c++
1419
1420 class Foo {
1421 char pre_my_constmember_string_post[4];
1422 }
1423
1424 .. option:: MethodCase
1425
1426 When defined, the check will ensure method names conform to the
1427 selected casing.
1428
1429 .. option:: MethodPrefix
1430
1431 When defined, the check will ensure method names will add the
1432 prefixed with the given value (regardless of casing).
1433
1434 .. option:: MethodIgnoredRegexp
1435
1436 Identifier naming checks won't be enforced for method names
1437 matching this regular expression.
1438
1439 .. option:: MethodSuffix
1440
1441 When defined, the check will ensure method names will add the
1442 suffix with the given value (regardless of casing).
1443
1444 For example using values of:
1445
1446 - MethodCase of ``lower_case``
1447 - MethodPrefix of ``pre_``
1448 - MethodSuffix of ``_post``
1449
1450 Identifies and/or transforms method names as follows:
1451
1452 Before:
1453
1454 .. code-block:: c++
1455
1456 class Foo {
1457 char MY_Method_string();
1458 }
1459
1460 After:
1461
1462 .. code-block:: c++
1463
1464 class Foo {
1465 char pre_my_method_string_post();
1466 }
1467
1468 .. option:: NamespaceCase
1469
1470 When defined, the check will ensure namespace names conform to the
1471 selected casing.
1472
1473 .. option:: NamespacePrefix
1474
1475 When defined, the check will ensure namespace names will add the
1476 prefixed with the given value (regardless of casing).
1477
1478 .. option:: NamespaceIgnoredRegexp
1479
1480 Identifier naming checks won't be enforced for namespace names
1481 matching this regular expression.
1482
1483 .. option:: NamespaceSuffix
1484
1485 When defined, the check will ensure namespace names will add the
1486 suffix with the given value (regardless of casing).
1487
1488 For example using values of:
1489
1490 - NamespaceCase of ``lower_case``
1491 - NamespacePrefix of ``pre_``
1492 - NamespaceSuffix of ``_post``
1493
1494 Identifies and/or transforms namespace names as follows:
1495
1496 Before:
1497
1498 .. code-block:: c++
1499
1500 namespace FOO_NS {
1501 ...
1502 }
1503
1504 After:
1505
1506 .. code-block:: c++
1507
1508 namespace pre_foo_ns_post {
1509 ...
1510 }
1511
1512 .. option:: ParameterCase
1513
1514 When defined, the check will ensure parameter names conform to the
1515 selected casing.
1516
1517 .. option:: ParameterPrefix
1518
1519 When defined, the check will ensure parameter names will add the
1520 prefixed with the given value (regardless of casing).
1521
1522 .. option:: ParameterIgnoredRegexp
1523
1524 Identifier naming checks won't be enforced for parameter names
1525 matching this regular expression.
1526
1527 .. option:: ParameterSuffix
1528
1529 When defined, the check will ensure parameter names will add the
1530 suffix with the given value (regardless of casing).
1531
1532 .. option:: ParameterHungarianPrefix
1533
1534 When enabled, the check ensures that the declared identifier will
1535 have a Hungarian notation prefix based on the declared type.
1536
1537 For example using values of:
1538
1539 - ParameterCase of ``lower_case``
1540 - ParameterPrefix of ``pre_``
1541 - ParameterSuffix of ``_post``
1542 - ParameterHungarianPrefix of ``On``
1543
1544 Identifies and/or transforms parameter names as follows:
1545
1546 Before:
1547
1548 .. code-block:: c++
1549
1550 void GLOBAL_FUNCTION(int PARAMETER_1, int const CONST_parameter);
1551
1552 After:
1553
1554 .. code-block:: c++
1555
1556 void GLOBAL_FUNCTION(int pre_parameter_post, int const CONST_parameter);
1557
1558 .. option:: ParameterPackCase
1559
1560 When defined, the check will ensure parameter pack names conform to the
1561 selected casing.
1562
1563 .. option:: ParameterPackPrefix
1564
1565 When defined, the check will ensure parameter pack names will add the
1566 prefixed with the given value (regardless of casing).
1567
1568 .. option:: ParameterPackIgnoredRegexp
1569
1570 Identifier naming checks won't be enforced for parameter pack names
1571 matching this regular expression.
1572
1573 .. option:: ParameterPackSuffix
1574
1575 When defined, the check will ensure parameter pack names will add the
1576 suffix with the given value (regardless of casing).
1577
1578 For example using values of:
1579
1580 - ParameterPackCase of ``lower_case``
1581 - ParameterPackPrefix of ``pre_``
1582 - ParameterPackSuffix of ``_post``
1583
1584 Identifies and/or transforms parameter pack names as follows:
1585
1586 Before:
1587
1588 .. code-block:: c++
1589
1590 template <typename... TYPE_parameters> {
1591 void FUNCTION(int... TYPE_parameters);
1592 }
1593
1594 After:
1595
1596 .. code-block:: c++
1597
1598 template <typename... TYPE_parameters> {
1599 void FUNCTION(int... pre_type_parameters_post);
1600 }
1601
1602 .. option:: PointerParameterCase
1603
1604 When defined, the check will ensure pointer parameter names conform to the
1605 selected casing.
1606
1607 .. option:: PointerParameterPrefix
1608
1609 When defined, the check will ensure pointer parameter names will add the
1610 prefixed with the given value (regardless of casing).
1611
1612 .. option:: PointerParameterIgnoredRegexp
1613
1614 Identifier naming checks won't be enforced for pointer parameter names
1615 matching this regular expression.
1616
1617 .. option:: PointerParameterSuffix
1618
1619 When defined, the check will ensure pointer parameter names will add the
1620 suffix with the given value (regardless of casing).
1621
1622 .. option:: PointerParameterHungarianPrefix
1623
1624 When enabled, the check ensures that the declared identifier will
1625 have a Hungarian notation prefix based on the declared type.
1626
1627 For example using values of:
1628
1629 - PointerParameterCase of ``lower_case``
1630 - PointerParameterPrefix of ``pre_``
1631 - PointerParameterSuffix of ``_post``
1632 - PointerParameterHungarianPrefix of ``On``
1633
1634 Identifies and/or transforms pointer parameter names as follows:
1635
1636 Before:
1637
1638 .. code-block:: c++
1639
1640 void FUNCTION(int *PARAMETER);
1641
1642 After:
1643
1644 .. code-block:: c++
1645
1646 void FUNCTION(int *pre_parameter_post);
1647
1648 .. option:: PrivateMemberCase
1649
1650 When defined, the check will ensure private member names conform to the
1651 selected casing.
1652
1653 .. option:: PrivateMemberPrefix
1654
1655 When defined, the check will ensure private member names will add the
1656 prefixed with the given value (regardless of casing).
1657
1658 .. option:: PrivateMemberIgnoredRegexp
1659
1660 Identifier naming checks won't be enforced for private member names
1661 matching this regular expression.
1662
1663 .. option:: PrivateMemberSuffix
1664
1665 When defined, the check will ensure private member names will add the
1666 suffix with the given value (regardless of casing).
1667
1668 .. option:: PrivateMemberHungarianPrefix
1669
1670 When enabled, the check ensures that the declared identifier will
1671 have a Hungarian notation prefix based on the declared type.
1672
1673 For example using values of:
1674
1675 - PrivateMemberCase of ``lower_case``
1676 - PrivateMemberPrefix of ``pre_``
1677 - PrivateMemberSuffix of ``_post``
1678 - PrivateMemberHungarianPrefix of ``On``
1679
1680 Identifies and/or transforms private member names as follows:
1681
1682 Before:
1683
1684 .. code-block:: c++
1685
1686 class Foo {
1687 private:
1688 int Member_Variable;
1689 }
1690
1691 After:
1692
1693 .. code-block:: c++
1694
1695 class Foo {
1696 private:
1697 int pre_member_variable_post;
1698 }
1699
1700 .. option:: PrivateMethodCase
1701
1702 When defined, the check will ensure private method names conform to the
1703 selected casing.
1704
1705 .. option:: PrivateMethodPrefix
1706
1707 When defined, the check will ensure private method names will add the
1708 prefixed with the given value (regardless of casing).
1709
1710 .. option:: PrivateMethodIgnoredRegexp
1711
1712 Identifier naming checks won't be enforced for private method names
1713 matching this regular expression.
1714
1715 .. option:: PrivateMethodSuffix
1716
1717 When defined, the check will ensure private method names will add the
1718 suffix with the given value (regardless of casing).
1719
1720 For example using values of:
1721
1722 - PrivateMethodCase of ``lower_case``
1723 - PrivateMethodPrefix of ``pre_``
1724 - PrivateMethodSuffix of ``_post``
1725
1726 Identifies and/or transforms private method names as follows:
1727
1728 Before:
1729
1730 .. code-block:: c++
1731
1732 class Foo {
1733 private:
1734 int Member_Method();
1735 }
1736
1737 After:
1738
1739 .. code-block:: c++
1740
1741 class Foo {
1742 private:
1743 int pre_member_method_post();
1744 }
1745
1746 .. option:: ProtectedMemberCase
1747
1748 When defined, the check will ensure protected member names conform to the
1749 selected casing.
1750
1751 .. option:: ProtectedMemberPrefix
1752
1753 When defined, the check will ensure protected member names will add the
1754 prefixed with the given value (regardless of casing).
1755
1756 .. option:: ProtectedMemberIgnoredRegexp
1757
1758 Identifier naming checks won't be enforced for protected member names
1759 matching this regular expression.
1760
1761 .. option:: ProtectedMemberSuffix
1762
1763 When defined, the check will ensure protected member names will add the
1764 suffix with the given value (regardless of casing).
1765
1766 .. option:: ProtectedMemberHungarianPrefix
1767
1768 When enabled, the check ensures that the declared identifier will
1769 have a Hungarian notation prefix based on the declared type.
1770
1771 For example using values of:
1772
1773 - ProtectedMemberCase of ``lower_case``
1774 - ProtectedMemberPrefix of ``pre_``
1775 - ProtectedMemberSuffix of ``_post``
1776 - ProtectedMemberHungarianPrefix of ``On``
1777
1778 Identifies and/or transforms protected member names as follows:
1779
1780 Before:
1781
1782 .. code-block:: c++
1783
1784 class Foo {
1785 protected:
1786 int Member_Variable;
1787 }
1788
1789 After:
1790
1791 .. code-block:: c++
1792
1793 class Foo {
1794 protected:
1795 int pre_member_variable_post;
1796 }
1797
1798 .. option:: ProtectedMethodCase
1799
1800 When defined, the check will ensure protected method names conform to the
1801 selected casing.
1802
1803 .. option:: ProtectedMethodPrefix
1804
1805 When defined, the check will ensure protected method names will add the
1806 prefixed with the given value (regardless of casing).
1807
1808 .. option:: ProtectedMethodIgnoredRegexp
1809
1810 Identifier naming checks won't be enforced for protected method names
1811 matching this regular expression.
1812
1813 .. option:: ProtectedMethodSuffix
1814
1815 When defined, the check will ensure protected method names will add the
1816 suffix with the given value (regardless of casing).
1817
1818 For example using values of:
1819
1820 - ProtectedMethodCase of ``lower_case``
1821 - ProtectedMethodPrefix of ``pre_``
1822 - ProtectedMethodSuffix of ``_post``
1823
1824 Identifies and/or transforms protect method names as follows:
1825
1826 Before:
1827
1828 .. code-block:: c++
1829
1830 class Foo {
1831 protected:
1832 int Member_Method();
1833 }
1834
1835 After:
1836
1837 .. code-block:: c++
1838
1839 class Foo {
1840 protected:
1841 int pre_member_method_post();
1842 }
1843
1844 .. option:: PublicMemberCase
1845
1846 When defined, the check will ensure public member names conform to the
1847 selected casing.
1848
1849 .. option:: PublicMemberPrefix
1850
1851 When defined, the check will ensure public member names will add the
1852 prefixed with the given value (regardless of casing).
1853
1854 .. option:: PublicMemberIgnoredRegexp
1855
1856 Identifier naming checks won't be enforced for public member names
1857 matching this regular expression.
1858
1859 .. option:: PublicMemberSuffix
1860
1861 When defined, the check will ensure public member names will add the
1862 suffix with the given value (regardless of casing).
1863
1864 .. option:: PublicMemberHungarianPrefix
1865
1866 When enabled, the check ensures that the declared identifier will
1867 have a Hungarian notation prefix based on the declared type.
1868
1869 For example using values of:
1870
1871 - PublicMemberCase of ``lower_case``
1872 - PublicMemberPrefix of ``pre_``
1873 - PublicMemberSuffix of ``_post``
1874 - PublicMemberHungarianPrefix of ``On``
1875
1876 Identifies and/or transforms public member names as follows:
1877
1878 Before:
1879
1880 .. code-block:: c++
1881
1882 class Foo {
1883 public:
1884 int Member_Variable;
1885 }
1886
1887 After:
1888
1889 .. code-block:: c++
1890
1891 class Foo {
1892 public:
1893 int pre_member_variable_post;
1894 }
1895
1896 .. option:: PublicMethodCase
1897
1898 When defined, the check will ensure public method names conform to the
1899 selected casing.
1900
1901 .. option:: PublicMethodPrefix
1902
1903 When defined, the check will ensure public method names will add the
1904 prefixed with the given value (regardless of casing).
1905
1906 .. option:: PublicMethodIgnoredRegexp
1907
1908 Identifier naming checks won't be enforced for public method names
1909 matching this regular expression.
1910
1911 .. option:: PublicMethodSuffix
1912
1913 When defined, the check will ensure public method names will add the
1914 suffix with the given value (regardless of casing).
1915
1916 For example using values of:
1917
1918 - PublicMethodCase of ``lower_case``
1919 - PublicMethodPrefix of ``pre_``
1920 - PublicMethodSuffix of ``_post``
1921
1922 Identifies and/or transforms public method names as follows:
1923
1924 Before:
1925
1926 .. code-block:: c++
1927
1928 class Foo {
1929 public:
1930 int Member_Method();
1931 }
1932
1933 After:
1934
1935 .. code-block:: c++
1936
1937 class Foo {
1938 public:
1939 int pre_member_method_post();
1940 }
1941
1942 .. option:: ScopedEnumConstantCase
1943
1944 When defined, the check will ensure scoped enum constant names conform to
1945 the selected casing.
1946
1947 .. option:: ScopedEnumConstantPrefix
1948
1949 When defined, the check will ensure scoped enum constant names will add the
1950 prefixed with the given value (regardless of casing).
1951
1952 .. option:: ScopedEnumConstantIgnoredRegexp
1953
1954 Identifier naming checks won't be enforced for scoped enum constant names
1955 matching this regular expression.
1956
1957 .. option:: ScopedEnumConstantSuffix
1958
1959 When defined, the check will ensure scoped enum constant names will add the
1960 suffix with the given value (regardless of casing).
1961
1962 .. option:: ScopedEnumConstantHungarianPrefix
1963
1964 When enabled, the check ensures that the declared identifier will
1965 have a Hungarian notation prefix based on the declared type.
1966
1967 For example using values of:
1968
1969 - ScopedEnumConstantCase of ``lower_case``
1970 - ScopedEnumConstantPrefix of ``pre_``
1971 - ScopedEnumConstantSuffix of ``_post``
1972 - ScopedEnumConstantHungarianPrefix of ``On``
1973
1974 Identifies and/or transforms enumeration constant names as follows:
1975
1976 Before:
1977
1978 .. code-block:: c++
1979
1980 enum class FOO { One, Two, Three };
1981
1982 After:
1983
1984 .. code-block:: c++
1985
1986 enum class FOO { pre_One_post, pre_Two_post, pre_Three_post };
1987
1988 .. option:: StaticConstantCase
1989
1990 When defined, the check will ensure static constant names conform to the
1991 selected casing.
1992
1993 .. option:: StaticConstantPrefix
1994
1995 When defined, the check will ensure static constant names will add the
1996 prefixed with the given value (regardless of casing).
1997
1998 .. option:: StaticConstantIgnoredRegexp
1999
2000 Identifier naming checks won't be enforced for static constant names
2001 matching this regular expression.
2002
2003 .. option:: StaticConstantSuffix
2004
2005 When defined, the check will ensure static constant names will add the
2006 suffix with the given value (regardless of casing).
2007
2008 .. option:: StaticConstantHungarianPrefix
2009
2010 When enabled, the check ensures that the declared identifier will
2011 have a Hungarian notation prefix based on the declared type.
2012
2013 For example using values of:
2014
2015 - StaticConstantCase of ``lower_case``
2016 - StaticConstantPrefix of ``pre_``
2017 - StaticConstantSuffix of ``_post``
2018 - StaticConstantHungarianPrefix of ``On``
2019
2020 Identifies and/or transforms static constant names as follows:
2021
2022 Before:
2023
2024 .. code-block:: c++
2025
2026 static unsigned const MyConstStatic_array[] = {1, 2, 3};
2027
2028 After:
2029
2030 .. code-block:: c++
2031
2032 static unsigned const pre_myconststatic_array_post[] = {1, 2, 3};
2033
2034 .. option:: StaticVariableCase
2035
2036 When defined, the check will ensure static variable names conform to the
2037 selected casing.
2038
2039 .. option:: StaticVariablePrefix
2040
2041 When defined, the check will ensure static variable names will add the
2042 prefixed with the given value (regardless of casing).
2043
2044 .. option:: StaticVariableIgnoredRegexp
2045
2046 Identifier naming checks won't be enforced for static variable names
2047 matching this regular expression.
2048
2049 .. option:: StaticVariableSuffix
2050
2051 When defined, the check will ensure static variable names will add the
2052 suffix with the given value (regardless of casing).
2053
2054 .. option:: StaticVariableHungarianPrefix
2055
2056 When enabled, the check ensures that the declared identifier will
2057 have a Hungarian notation prefix based on the declared type.
2058
2059 For example using values of:
2060
2061 - StaticVariableCase of ``lower_case``
2062 - StaticVariablePrefix of ``pre_``
2063 - StaticVariableSuffix of ``_post``
2064 - StaticVariableHungarianPrefix of ``On``
2065
2066 Identifies and/or transforms static variable names as follows:
2067
2068 Before:
2069
2070 .. code-block:: c++
2071
2072 static unsigned MyStatic_array[] = {1, 2, 3};
2073
2074 After:
2075
2076 .. code-block:: c++
2077
2078 static unsigned pre_mystatic_array_post[] = {1, 2, 3};
2079
2080 .. option:: StructCase
2081
2082 When defined, the check will ensure struct names conform to the
2083 selected casing.
2084
2085 .. option:: StructPrefix
2086
2087 When defined, the check will ensure struct names will add the
2088 prefixed with the given value (regardless of casing).
2089
2090 .. option:: StructIgnoredRegexp
2091
2092 Identifier naming checks won't be enforced for struct names
2093 matching this regular expression.
2094
2095 .. option:: StructSuffix
2096
2097 When defined, the check will ensure struct names will add the
2098 suffix with the given value (regardless of casing).
2099
2100 For example using values of:
2101
2102 - StructCase of ``lower_case``
2103 - StructPrefix of ``pre_``
2104 - StructSuffix of ``_post``
2105
2106 Identifies and/or transforms struct names as follows:
2107
2108 Before:
2109
2110 .. code-block:: c++
2111
2112 struct FOO {
2113 FOO();
2114 ~FOO();
2115 };
2116
2117 After:
2118
2119 .. code-block:: c++
2120
2121 struct pre_foo_post {
2122 pre_foo_post();
2123 ~pre_foo_post();
2124 };
2125
2126 .. option:: TemplateParameterCase
2127
2128 When defined, the check will ensure template parameter names conform to the
2129 selected casing.
2130
2131 .. option:: TemplateParameterPrefix
2132
2133 When defined, the check will ensure template parameter names will add the
2134 prefixed with the given value (regardless of casing).
2135
2136 .. option:: TemplateParameterIgnoredRegexp
2137
2138 Identifier naming checks won't be enforced for template parameter names
2139 matching this regular expression.
2140
2141 .. option:: TemplateParameterSuffix
2142
2143 When defined, the check will ensure template parameter names will add the
2144 suffix with the given value (regardless of casing).
2145
2146 For example using values of:
2147
2148 - TemplateParameterCase of ``lower_case``
2149 - TemplateParameterPrefix of ``pre_``
2150 - TemplateParameterSuffix of ``_post``
2151
2152 Identifies and/or transforms template parameter names as follows:
2153
2154 Before:
2155
2156 .. code-block:: c++
2157
2158 template <typename T> class Foo {};
2159
2160 After:
2161
2162 .. code-block:: c++
2163
2164 template <typename pre_t_post> class Foo {};
2165
2166 .. option:: TemplateTemplateParameterCase
2167
2168 When defined, the check will ensure template template parameter names conform to the
2169 selected casing.
2170
2171 .. option:: TemplateTemplateParameterPrefix
2172
2173 When defined, the check will ensure template template parameter names will add the
2174 prefixed with the given value (regardless of casing).
2175
2176 .. option:: TemplateTemplateParameterIgnoredRegexp
2177
2178 Identifier naming checks won't be enforced for template template parameter
2179 names matching this regular expression.
2180
2181 .. option:: TemplateTemplateParameterSuffix
2182
2183 When defined, the check will ensure template template parameter names will add the
2184 suffix with the given value (regardless of casing).
2185
2186 For example using values of:
2187
2188 - TemplateTemplateParameterCase of ``lower_case``
2189 - TemplateTemplateParameterPrefix of ``pre_``
2190 - TemplateTemplateParameterSuffix of ``_post``
2191
2192 Identifies and/or transforms template template parameter names as follows:
2193
2194 Before:
2195
2196 .. code-block:: c++
2197
2198 template <template <typename> class TPL_parameter, int COUNT_params,
2199 typename... TYPE_parameters>
2200
2201 After:
2202
2203 .. code-block:: c++
2204
2205 template <template <typename> class pre_tpl_parameter_post, int COUNT_params,
2206 typename... TYPE_parameters>
2207
2208 .. option:: TypeAliasCase
2209
2210 When defined, the check will ensure type alias names conform to the
2211 selected casing.
2212
2213 .. option:: TypeAliasPrefix
2214
2215 When defined, the check will ensure type alias names will add the
2216 prefixed with the given value (regardless of casing).
2217
2218 .. option:: TypeAliasIgnoredRegexp
2219
2220 Identifier naming checks won't be enforced for type alias names
2221 matching this regular expression.
2222
2223 .. option:: TypeAliasSuffix
2224
2225 When defined, the check will ensure type alias names will add the
2226 suffix with the given value (regardless of casing).
2227
2228 For example using values of:
2229
2230 - TypeAliasCase of ``lower_case``
2231 - TypeAliasPrefix of ``pre_``
2232 - TypeAliasSuffix of ``_post``
2233
2234 Identifies and/or transforms type alias names as follows:
2235
2236 Before:
2237
2238 .. code-block:: c++
2239
2240 using MY_STRUCT_TYPE = my_structure;
2241
2242 After:
2243
2244 .. code-block:: c++
2245
2246 using pre_my_struct_type_post = my_structure;
2247
2248 .. option:: TypedefCase
2249
2250 When defined, the check will ensure typedef names conform to the
2251 selected casing.
2252
2253 .. option:: TypedefPrefix
2254
2255 When defined, the check will ensure typedef names will add the
2256 prefixed with the given value (regardless of casing).
2257
2258 .. option:: TypedefIgnoredRegexp
2259
2260 Identifier naming checks won't be enforced for typedef names
2261 matching this regular expression.
2262
2263 .. option:: TypedefSuffix
2264
2265 When defined, the check will ensure typedef names will add the
2266 suffix with the given value (regardless of casing).
2267
2268 For example using values of:
2269
2270 - TypedefCase of ``lower_case``
2271 - TypedefPrefix of ``pre_``
2272 - TypedefSuffix of ``_post``
2273
2274 Identifies and/or transforms typedef names as follows:
2275
2276 Before:
2277
2278 .. code-block:: c++
2279
2280 typedef int MYINT;
2281
2282 After:
2283
2284 .. code-block:: c++
2285
2286 typedef int pre_myint_post;
2287
2288 .. option:: TypeTemplateParameterCase
2289
2290 When defined, the check will ensure type template parameter names conform to the
2291 selected casing.
2292
2293 .. option:: TypeTemplateParameterPrefix
2294
2295 When defined, the check will ensure type template parameter names will add the
2296 prefixed with the given value (regardless of casing).
2297
2298 .. option:: TypeTemplateParameterIgnoredRegexp
2299
2300 Identifier naming checks won't be enforced for type template names
2301 matching this regular expression.
2302
2303 .. option:: TypeTemplateParameterSuffix
2304
2305 When defined, the check will ensure type template parameter names will add the
2306 suffix with the given value (regardless of casing).
2307
2308 For example using values of:
2309
2310 - TypeTemplateParameterCase of ``lower_case``
2311 - TypeTemplateParameterPrefix of ``pre_``
2312 - TypeTemplateParameterSuffix of ``_post``
2313
2314 Identifies and/or transforms type template parameter names as follows:
2315
2316 Before:
2317
2318 .. code-block:: c++
2319
2320 template <template <typename> class TPL_parameter, int COUNT_params,
2321 typename... TYPE_parameters>
2322
2323 After:
2324
2325 .. code-block:: c++
2326
2327 template <template <typename> class TPL_parameter, int COUNT_params,
2328 typename... pre_type_parameters_post>
2329
2330 .. option:: UnionCase
2331
2332 When defined, the check will ensure union names conform to the
2333 selected casing.
2334
2335 .. option:: UnionPrefix
2336
2337 When defined, the check will ensure union names will add the
2338 prefixed with the given value (regardless of casing).
2339
2340 .. option:: UnionIgnoredRegexp
2341
2342 Identifier naming checks won't be enforced for union names
2343 matching this regular expression.
2344
2345 .. option:: UnionSuffix
2346
2347 When defined, the check will ensure union names will add the
2348 suffix with the given value (regardless of casing).
2349
2350 For example using values of:
2351
2352 - UnionCase of ``lower_case``
2353 - UnionPrefix of ``pre_``
2354 - UnionSuffix of ``_post``
2355
2356 Identifies and/or transforms union names as follows:
2357
2358 Before:
2359
2360 .. code-block:: c++
2361
2362 union FOO {
2363 int a;
2364 char b;
2365 };
2366
2367 After:
2368
2369 .. code-block:: c++
2370
2371 union pre_foo_post {
2372 int a;
2373 char b;
2374 };
2375
2376 .. option:: ValueTemplateParameterCase
2377
2378 When defined, the check will ensure value template parameter names conform to the
2379 selected casing.
2380
2381 .. option:: ValueTemplateParameterPrefix
2382
2383 When defined, the check will ensure value template parameter names will add the
2384 prefixed with the given value (regardless of casing).
2385
2386 .. option:: ValueTemplateParameterIgnoredRegexp
2387
2388 Identifier naming checks won't be enforced for value template parameter
2389 names matching this regular expression.
2390
2391 .. option:: ValueTemplateParameterSuffix
2392
2393 When defined, the check will ensure value template parameter names will add the
2394 suffix with the given value (regardless of casing).
2395
2396 For example using values of:
2397
2398 - ValueTemplateParameterCase of ``lower_case``
2399 - ValueTemplateParameterPrefix of ``pre_``
2400 - ValueTemplateParameterSuffix of ``_post``
2401
2402 Identifies and/or transforms value template parameter names as follows:
2403
2404 Before:
2405
2406 .. code-block:: c++
2407
2408 template <template <typename> class TPL_parameter, int COUNT_params,
2409 typename... TYPE_parameters>
2410
2411 After:
2412
2413 .. code-block:: c++
2414
2415 template <template <typename> class TPL_parameter, int pre_count_params_post,
2416 typename... TYPE_parameters>
2417
2418 .. option:: VariableCase
2419
2420 When defined, the check will ensure variable names conform to the
2421 selected casing.
2422
2423 .. option:: VariablePrefix
2424
2425 When defined, the check will ensure variable names will add the
2426 prefixed with the given value (regardless of casing).
2427
2428 .. option:: VariableIgnoredRegexp
2429
2430 Identifier naming checks won't be enforced for variable names
2431 matching this regular expression.
2432
2433 .. option:: VariableSuffix
2434
2435 When defined, the check will ensure variable names will add the
2436 suffix with the given value (regardless of casing).
2437
2438 .. option:: VariableHungarianPrefix
2439
2440 When enabled, the check ensures that the declared identifier will
2441 have a Hungarian notation prefix based on the declared type.
2442
2443 For example using values of:
2444
2445 - VariableCase of ``lower_case``
2446 - VariablePrefix of ``pre_``
2447 - VariableSuffix of ``_post``
2448 - VariableHungarianPrefix of ``On``
2449
2450 Identifies and/or transforms variable names as follows:
2451
2452 Before:
2453
2454 .. code-block:: c++
2455
2456 unsigned MyVariable;
2457
2458 After:
2459
2460 .. code-block:: c++
2461
2462 unsigned pre_myvariable_post;
2463
2464 .. option:: VirtualMethodCase
2465
2466 When defined, the check will ensure virtual method names conform to the
2467 selected casing.
2468
2469 .. option:: VirtualMethodPrefix
2470
2471 When defined, the check will ensure virtual method names will add the
2472 prefixed with the given value (regardless of casing).
2473
2474 .. option:: VirtualMethodIgnoredRegexp
2475
2476 Identifier naming checks won't be enforced for virtual method names
2477 matching this regular expression.
2478
2479 .. option:: VirtualMethodSuffix
2480
2481 When defined, the check will ensure virtual method names will add the
2482 suffix with the given value (regardless of casing).
2483
2484 For example using values of:
2485
2486 - VirtualMethodCase of ``lower_case``
2487 - VirtualMethodPrefix of ``pre_``
2488 - VirtualMethodSuffix of ``_post``
2489
2490 Identifies and/or transforms virtual method names as follows:
2491
2492 Before:
2493
2494 .. code-block:: c++
2495
2496 class Foo {
2497 public:
2498 virtual int MemberFunction();
2499 }
2500
2501 After:
2502
2503 .. code-block:: c++
2504
2505 class Foo {
2506 public:
2507 virtual int pre_member_function_post();
2508 }
2509
2510
2511 The default mapping table of Hungarian Notation
2512 -----------------------------------------------
2513
2514 In Hungarian notation, a variable name starts with a group of lower-case
2515 letters which are mnemonics for the type or purpose of that variable, followed
2516 by whatever name the programmer has chosen; this last part is sometimes
2517 distinguished as the given name. The first character of the given name can be
2518 capitalized to separate it from the type indicators (see also CamelCase).
2519 Otherwise the case of this character denotes scope.
2520
2521 The following table is the default mapping table of Hungarian Notation which
2522 maps Decl to its prefix string. You can also have your own style in config file.
2523
2524 ================= ============== ====================== ============== =========== ==============
2525 Primitive Types Microsoft data types
2526 ---------------------------------------------------------------------- --------------------------
2527 Type Prefix Type Prefix Type Prefix
2528 ================= ============== ====================== ============== =========== ==============
2529 int8_t i8 signed int si BOOL b
2530 int16_t i16 signed short ss BOOLEAN b
2531 int32_t i32 signed short int ssi BYTE by
2532 int64_t i64 signed long long int slli CHAR c
2533 uint8_t u8 signed long long sll UCHAR uc
2534 uint16_t u16 signed long int sli SHORT s
2535 uint32_t u32 signed long sl USHORT us
2536 uint64_t u64 signed s WORD w
2537 char8_t c8 unsigned long long int ulli DWORD dw
2538 char16_t c16 unsigned long long ull DWORD32 dw32
2539 char32_t c32 unsigned long int uli DWORD64 dw64
2540 float f unsigned long ul LONG l
2541 double d unsigned short int usi ULONG ul
2542 char c unsigned short us ULONG32 ul32
2543 bool b unsigned int ui ULONG64 ul64
2544 _Bool b unsigned u ULONGLONG ull
2545 int i long long int lli HANDLE h
2546 size_t n long double ld INT i
2547 short s long long ll INT8 i8
2548 signed i long int li INT16 i16
2549 unsigned u long l INT32 i32
2550 long l ptrdiff_t p INT64 i64
2551 long long ll UINT ui
2552 unsigned long ul UINT8 u8
2553 long double ld UINT16 u16
2554 ptrdiff_t p UINT32 u32
2555 wchar_t wc UINT64 u64
2556 short int si PVOID p
2557 short s
2558 ================= ============== ====================== ============== =========== ==============
2559
2560 **There are more trivial options for Hungarian Notation:**
2561
2562 **HungarianNotation.General.***
2563 Options are not belonging to any specific Decl.
2564
2565 **HungarianNotation.CString.***
2566 Options for NULL-terminated string.
2567
2568 **HungarianNotation.DerivedType.***
2569 Options for derived types.
2570
2571 **HungarianNotation.PrimitiveType.***
2572 Options for primitive types.
2573
2574 **HungarianNotation.UserDefinedType.***
2575 Options for user-defined types.
2576
2577
2578 Options for Hungarian Notation
2579 ------------------------------
2580
2581 - :option:`HungarianNotation.General.TreatStructAsClass`
2582
2583 - :option:`HungarianNotation.DerivedType.Array`
2584 - :option:`HungarianNotation.DerivedType.Pointer`
2585 - :option:`HungarianNotation.DerivedType.FunctionPointer`
2586
2587 - :option:`HungarianNotation.CString.CharPrinter`
2588 - :option:`HungarianNotation.CString.CharArray`
2589 - :option:`HungarianNotation.CString.WideCharPrinter`
2590 - :option:`HungarianNotation.CString.WideCharArray`
2591
2592 - :option:`HungarianNotation.PrimitiveType.*`
2593 - :option:`HungarianNotation.UserDefinedType.*`
2594
2595 .. option:: HungarianNotation.General.TreatStructAsClass
2596
2597 When defined, the check will treat naming of struct as a class.
2598 The default value is `false`.
2599
2600 .. option:: HungarianNotation.DerivedType.Array
2601
2602 When defined, the check will ensure variable name will add the prefix with
2603 the given string. The default prefix is `a`.
2604
2605 .. option:: HungarianNotation.DerivedType.Pointer
2606
2607 When defined, the check will ensure variable name will add the prefix with
2608 the given string. The default prefix is `p`.
2609
2610 .. option:: HungarianNotation.DerivedType.FunctionPointer
2611
2612 When defined, the check will ensure variable name will add the prefix with
2613 the given string. The default prefix is `fn`.
2614
2615
2616 Before:
2617
2618 .. code-block:: c++
2619
2620 // Array
2621 int DataArray[2] = {0};
2622
2623 // Pointer
2624 void *DataBuffer = NULL;
2625
2626 // FunctionPointer
2627 typedef void (*FUNC_PTR)();
2628 FUNC_PTR FuncPtr = NULL;
2629
2630 After:
2631
2632 .. code-block:: c++
2633
2634 // Array
2635 int aDataArray[2] = {0};
2636
2637 // Pointer
2638 void *pDataBuffer = NULL;
2639
2640 // FunctionPointer
2641 typedef void (*FUNC_PTR)();
2642 FUNC_PTR fnFuncPtr = NULL;
2643
2644
2645 .. option:: HungarianNotation.CString.CharPrinter
2646
2647 When defined, the check will ensure variable name will add the prefix with
2648 the given string. The default prefix is `sz`.
2649
2650 .. option:: HungarianNotation.CString.CharArray
2651
2652 When defined, the check will ensure variable name will add the prefix with
2653 the given string. The default prefix is `sz`.
2654
2655 .. option:: HungarianNotation.CString.WideCharPrinter
2656
2657 When defined, the check will ensure variable name will add the prefix with
2658 the given string. The default prefix is `wsz`.
2659
2660 .. option:: HungarianNotation.CString.WideCharArray
2661
2662 When defined, the check will ensure variable name will add the prefix with
2663 the given string. The default prefix is `wsz`.
2664
2665
2666 Before:
2667
2668 .. code-block:: c++
2669
2670 // CharPrinter
2671 const char *NamePtr = "Name";
2672
2673 // CharArray
2674 const char NameArray[] = "Name";
2675
2676 // WideCharPrinter
2677 const wchar_t *WideNamePtr = L"Name";
2678
2679 // WideCharArray
2680 const wchar_t WideNameArray[] = L"Name";
2681
2682 After:
2683
2684 .. code-block:: c++
2685
2686 // CharPrinter
2687 const char *szNamePtr = "Name";
2688
2689 // CharArray
2690 const char szNameArray[] = "Name";
2691
2692 // WideCharPrinter
2693 const wchar_t *wszWideNamePtr = L"Name";
2694
2695 // WideCharArray
2696 const wchar_t wszWideNameArray[] = L"Name";
2697
2698
2699 .. option:: HungarianNotation.PrimitiveType.*
2700
2701 When defined, the check will ensure variable name of involved primitive
2702 types will add the prefix with the given string. The default prefixes are
2703 defined in the default mapping table.
2704
2705 .. option:: HungarianNotation.UserDefinedType.*
2706
2707 When defined, the check will ensure variable name of involved primitive
2708 types will add the prefix with the given string. The default prefixes are
2709 defined in the default mapping table.
2710
2711
2712 Before:
2713
2714 .. code-block:: c++
2715
2716 int8_t ValueI8 = 0;
2717 int16_t ValueI16 = 0;
2718 int32_t ValueI32 = 0;
2719 int64_t ValueI64 = 0;
2720 uint8_t ValueU8 = 0;
2721 uint16_t ValueU16 = 0;
2722 uint32_t ValueU32 = 0;
2723 uint64_t ValueU64 = 0;
2724 float ValueFloat = 0.0;
2725 double ValueDouble = 0.0;
2726 ULONG ValueUlong = 0;
2727 DWORD ValueDword = 0;
2728
2729 After:
2730
2731 .. code-block:: c++
2732
2733 int8_t i8ValueI8 = 0;
2734 int16_t i16ValueI16 = 0;
2735 int32_t i32ValueI32 = 0;
2736 int64_t i64ValueI64 = 0;
2737 uint8_t u8ValueU8 = 0;
2738 uint16_t u16ValueU16 = 0;
2739 uint32_t u32ValueU32 = 0;
2740 uint64_t u64ValueU64 = 0;
2741 float fValueFloat = 0.0;
2742 double dValueDouble = 0.0;
2743 ULONG ulValueUlong = 0;
2744 DWORD dwValueDword = 0;