Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-3853

Type names should comply with a naming convention

    XMLWordPrintable

    Details

    • Type: Code Smell Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Rename this type to match the regular expression: ${format}.
    • Highlighting:
      Hide

      name value

      Show
      name value
    • List of parameters:
      Hide
      • Key: format
      • Description: Regular expression used to check types against
      • Default value: ^[a-z]([A-Z][a-z0-9])*Type$
      Show
      Key: format Description: Regular expression used to check types against Default value: ^ [a-z] ( [A-Z] [a-z0-9] )*Type$
    • Default Severity:
      Info
    • Targeted languages:
      XML
    • Irrelevant for Languages:
      ABAP, C#, C, C++, Cobol, CSS, Flex, HTML, Java, JavaScript, Objective-C, PHP, PL/I, PL/SQL, Python, RPG, Swift, VB.Net, VB6
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      5min
    • Analysis Scope:
      Main Sources, Test Sources

      Description

      Sharing naming conventions allows teams to collaborate efficiently. This rule checks that type names match a provided regular expression.

      Noncompliant Code Example

      With the default regular expression:

      <xs:complexType name="fruit">    <!-- Noncompliant -->
        ...
      </xs:complexType>
      

      Compliant Solution

      <xs:complexType name="fruitType">
        ...
      </xs:complexType>
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ann.campbell.2 Ann Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: