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