Type alias name is not PascalCase
ID |
c.maintainability.naming_typedef |
Severity |
info |
Remediation Complexity |
trivial |
Remediation Risk |
low |
Remediation Effort |
low |
Resource |
Naming |
Language |
C / C++ |
Description
Type alias $N is not named in PascalCase. By convention, typedef and using type aliases use UpperCamelCase names (e.g. WidgetHandle) so they read as type names. Rename the alias to match ^[A-Z][A-Za-z0-9]*$.
Rationale
Type alias $N is not named in PascalCase. By convention, typedef and using type aliases use UpperCamelCase names (e.g. WidgetHandle) so they read as type names. Rename the alias to match ^[A-Z][A-Za-z0-9]*$.
The following code illustrates the pattern detected by this rule:
// FLAGGED: Type alias name is not PascalCase
typedef int my_int;