Generic values should not contain more than a single uppercase letter.
Non-Compliant Code Examples
// 'e' is lowercasedpublicinterfaceGenericFoo<eextendsBaseBar,KextendsSerializable>{}// 'EF' is two characters.publicinterfaceGenericFoo<EFextendsBaseBar,KextendsSerializable>{}
Compliant Code Examples
publicinterfaceGenericFoo<EextendsBaseBar,KextendsSerializable>extendsBaseFoo{// This is ok...}publicinterfaceGenericFoo<EextendsBaseBar,KextendsSerializable>{// Also this}
Seamless integrations. Try Datadog Code Security
Datadog Code Security
Try this rule and analyze your code with Datadog Code Security
How to use this rule
1
2
rulesets:- java-code-style # Rules to enforce Java code style.
Create a static-analysis.datadog.yml with the content above at the root of your repository
Use our free IDE Plugins or add Code Security scans to your CI pipelines