2023-05-03 11:06:20 +02:00
|
|
|
== Why is this an issue?
|
|
|
|
|
2020-06-30 12:48:39 +02:00
|
|
|
Shared coding conventions allow teams to collaborate effectively. This rule checks that labels match a provided regular expression.
|
|
|
|
|
|
|
|
|
2023-05-03 11:06:20 +02:00
|
|
|
=== Noncompliant code example
|
2020-06-30 12:48:39 +02:00
|
|
|
|
2021-01-27 13:42:22 +01:00
|
|
|
With default provided regular expression ``++^[A-Z][A-Z0-9_]*$++``:
|
2020-06-30 14:49:38 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,text]
|
2020-06-30 12:48:39 +02:00
|
|
|
----
|
|
|
|
exit: // Noncompliant
|
|
|
|
doCleanup();
|
|
|
|
----
|
|
|
|
|
|
|
|
|
2023-05-03 11:06:20 +02:00
|
|
|
=== Compliant solution
|
2020-06-30 12:48:39 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,text]
|
2020-06-30 12:48:39 +02:00
|
|
|
----
|
|
|
|
EXIT: // Compliant
|
|
|
|
doCleanup();
|
|
|
|
----
|
|
|
|
|