-
Type:
Code Smell Detection
-
Status: Active
-
Resolution: Unresolved
-
Labels:
-
Message:Rename this union to match the regular expression ${format}
-
List of parameters:
-
Default Severity:Minor
-
Impact:Low
-
Likelihood:Low
-
Covered Languages:C, C++, Objective-C
-
Remediation Function:Constant/Issue
-
Constant Cost:10min
Sharing some naming conventions enables teams to collaborate more efficiently. This rule checks that all union names match a provided regular expression.
Noncompliant Code Example
Using the default regular expression ^[A-Z][a-zA-Z0-9]*$:
union my_union { int one; int two; };
Compliant Solution
union MyUnion { int one; int two; };