2023-10-17 09:45:51 +02:00
|
|
|
:identifier_capital_plural: Variables
|
|
|
|
:identifier: variable
|
|
|
|
:identifier_plural: variables
|
|
|
|
:identifier_or: variable
|
|
|
|
:regex: [a-zA-Z]([a-zA-Z0-9_]*[a-zA-Z0-9])?
|
2023-05-03 11:06:20 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
include::../rule.adoc[]
|
2020-06-30 10:16:44 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
=== Code examples
|
2020-06-30 10:16:44 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
==== Noncompliant code example
|
2020-06-30 14:49:38 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
With the default regular expression ``{regex}``:
|
|
|
|
|
|
|
|
[source,sql,diff-id=1,diff-type=noncompliant]
|
2020-06-30 10:16:44 +02:00
|
|
|
----
|
|
|
|
DECLARE
|
|
|
|
badVariable_ PLS_INTEGER; -- Non-Compliant
|
|
|
|
BEGIN
|
|
|
|
NULL;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
----
|
2021-06-02 20:44:38 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
==== Compliant solution
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
[source,sql,diff-id=1,diff-type=compliant]
|
|
|
|
----
|
|
|
|
DECLARE
|
|
|
|
goodVariable PLS_INTEGER; -- Compliant
|
|
|
|
BEGIN
|
|
|
|
NULL;
|
|
|
|
END;
|
|
|
|
/
|
|
|
|
----
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
== Resources
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
=== Documentation
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
* Wikipedia - https://en.wikipedia.org/wiki/Naming_convention_(programming)[Naming Convention (programming)]
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
=== Related rules
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
* S115 - Constant names should comply with a naming convention
|
|
|
|
* S120 - Package names should comply with a naming convention
|
|
|
|
* S1542 - Function and procedure names should comply with a naming convention
|
|
|
|
* S1615 - Constraint names should comply with a naming convention
|
|
|
|
* S1654 - Function and procedure parameters should comply with a naming convention
|
|
|
|
* S2490 - Exceptions should follow a naming convention
|
|
|
|
* S2491 - Cursor parameters should follow a naming convention
|
|
|
|
* S2492 - Types should follow a naming convention
|
|
|
|
* S2517 - Cursors should follow a naming convention
|
|
|
|
* S2519 - Record fields should comply with a naming convention
|
|
|
|
* S2520 - Object attributes should comply with a naming convention
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
2023-05-25 14:18:12 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
include::../message.adoc[]
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-10-17 09:45:51 +02:00
|
|
|
include::../parameters.adoc[]
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2021-06-08 15:52:13 +02:00
|
|
|
'''
|
2021-06-02 20:44:38 +02:00
|
|
|
== Comments And Links
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../comments-and-links.adoc[]
|
2023-06-22 10:38:01 +02:00
|
|
|
|
2021-06-03 09:05:38 +02:00
|
|
|
endif::env-github,rspecator-view[]
|