Details
-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Labels:
-
Message:Rename label "xxx" to match the regular expression: xxx
-
List of parameters:
- key: format
- description: Regular expression used to check the label names against.
- default: ^[A-Z][A-Z0-9_]*$
-
Default Severity:Minor
-
Impact:Low
-
Likelihood:Low
-
Default Quality Profiles:Sonar way
-
Targeted languages:C#, Flex, Java
-
Covered Languages:C, C++, Objective-C
-
Remediation Function:Constant/Issue
-
Constant Cost:5min
Description
Shared coding conventions allow teams to collaborate effectively. This rule checks that labels match a provided regular expression.
Noncompliant Code Example
With default provided regular expression ^[A-Z][A-Z0-9_]*$:
exit: // Noncompliant
doCleanup();
Compliant Solution
EXIT: // Compliant
doCleanup();
Attachments
Issue Links
- is implemented by
-
CPP-1234 Rule: Label names should comply with a naming convention
-
- Closed
-