rspec/rules/S117/plsql/rule.adoc
nicolas-gauthier-sonarsource c5507032cc
Modify S117: Migrate to LaYC (#3263)
## Review

A dedicated reviewer checked the rule description successfully for:

- [ ] logical errors and incorrect information
- [ ] information gaps and missing content
- [ ] text style and tone
- [ ] PR summary and labels follow [the
guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule)
2023-10-17 09:45:51 +02:00

74 lines
1.7 KiB
Plaintext

:identifier_capital_plural: Variables
:identifier: variable
:identifier_plural: variables
:identifier_or: variable
:regex: [a-zA-Z]([a-zA-Z0-9_]*[a-zA-Z0-9])?
include::../rule.adoc[]
=== Code examples
==== Noncompliant code example
With the default regular expression ``{regex}``:
[source,sql,diff-id=1,diff-type=noncompliant]
----
DECLARE
badVariable_ PLS_INTEGER; -- Non-Compliant
BEGIN
NULL;
END;
/
----
==== Compliant solution
[source,sql,diff-id=1,diff-type=compliant]
----
DECLARE
goodVariable PLS_INTEGER; -- Compliant
BEGIN
NULL;
END;
/
----
== Resources
=== Documentation
* Wikipedia - https://en.wikipedia.org/wiki/Naming_convention_(programming)[Naming Convention (programming)]
=== Related rules
* 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
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]