rspec/rules/S2490/rule.adoc

33 lines
473 B
Plaintext
Raw Permalink Normal View History

== Why is this an issue?
2020-06-30 12:48:07 +02:00
Naming conventions allow teams to collaborate effectively. This rule checks that exception names match a given regular expression.
=== Noncompliant code example
2020-06-30 12:48:07 +02:00
2021-01-27 13:42:22 +01:00
With the default regular expression ``++[a-zA-Z]([a-zA-Z0-9_]*[a-zA-Z0-9])?++``:
2022-02-04 17:28:24 +01:00
[source,text]
2020-06-30 12:48:07 +02:00
----
DECLARE
my-Exception_ EXCEPTION; -- Noncompliant
BEGIN
NULL;
END;
/
----
=== Compliant solution
2020-06-30 12:48:07 +02:00
2022-02-04 17:28:24 +01:00
[source,text]
2020-06-30 12:48:07 +02:00
----
DECLARE
myException EXCEPTION;
BEGIN
NULL;
END;
/
----