rspec/rules/S1282/cobol/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

59 lines
878 B
Plaintext

== Why is this an issue?
Having several levels of nested SQL SELECT statements makes the code difficult to read and should therefore be avoided.
=== Noncompliant code example
With an allowed nesting level of 2:
[source,cobol]
----
*> Non-Compliant
EXEC SQL
SELECT * FROM my_table1 WHERE
my_column1 IN
(SELECT my_column2 FROM my_table2
WHERE my_column3 IN
(SELECT my_column4 FROM my_table3))
END-EXEC.
----
=== Compliant solution
[source,cobol]
----
EXEC SQL
SELECT * FROM my_table
END-EXEC.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Parameters
.maximumNestedLevelThreshold
****
----
3
----
The number of authorized nested "SELECT" statements
****
'''
== Comments And Links
(visible only on this page)
=== is related to: S2524
endif::env-github,rspecator-view[]