Why is this an issue?

Sharing some naming conventions is a key point to make it possible for a team to efficiently collaborate. This rule allows to check that all constraint names match a provided regular expression.

How to fix it

Code examples

Noncompliant code example

With default regular expression ^[a-z]|[a-z]+[a-z0-9_]*[a-z0-9]+$:

constraint MyRange { 0 < min; typ < max; typ > min; max < 128; }

Compliant solution

With default regular expression ^[a-z]|[a-z]+[a-z0-9_]*[a-z0-9]+$:

constraint my_range { 0 < min; typ < max; typ > min; max < 128; }

Resources

Articles & blog posts