Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Message:
      Hide
      * Rename [class|interface|struct] "XXX" to match PascalCase naming rules, consider using "Xxx".
      * Rename [class|interface|struct] "XXX" to match PascalCase naming rules, trim underscores from the name.
      Show
      * Rename [class|interface|struct] "XXX" to match PascalCase naming rules, consider using "Xxx". * Rename [class|interface|struct] "XXX" to match PascalCase naming rules, trim underscores from the name.
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity

      Description

      Shared naming conventions allow teams to collaborate efficiently. This rule checks whether or not type names are using PascalCase. To reduce noise, two consecutive upper case characters are allowed unless they form the whole type name. So, MyXClass is compliant, but XC on its own is not.

      Noncompliant Code Example

      class my_class {...}
      class SOMEName42 {...}
      

      Compliant Solution

      class MyClass {...}
      class SomeName42 {...}
      

      Exceptions

      • The rule ignores types that are marked with ComImportAttribute or InterfaceTypeAttribute.
      • The rule allows for two-letter acronyms in which both letters are capitalized, as shown in the following identifier: IOStream
      • The rule allows having '_' characters in class names inside test projects.
      class Some_Name___42 {...} // valid in test
      class Some_name___42 {...} // still not valid
      class Some_Name_XC {...} // invalid because of XC, should be Some_Name_Xc
      

      See

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tamas.vajk Tamas Vajk (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: