rspec/rules/S1305/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

60 lines
1.3 KiB
Plaintext

== Why is this an issue?
Every section should be commented to explain its goal and how it works. This comment can be placed either just before or just after the section label.
=== Noncompliant code example
[source,cobol]
----
UNCOMMENTED-SECTION SECTION.
----
=== Compliant solution
[source,cobol]
----
* Some comments
CORRECTLY-COMMENTED-SECTION SECTION.
ANOTHER-CORRECTLY-COMMENTED-SECTION SECTION.
* Some comments
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Document this section by adding a comment either before or after the section label.
'''
== Comments And Links
(visible only on this page)
=== relates to: S1304
=== on 9 Oct 2013, 00:11:19 Ann Campbell wrote:
The Noncompliant example for this one embeds the compliant examples. Is this sufficient, or should they be split out? Should I be adding a compliant copy of the example?
=== on 10 Oct 2013, 08:51:16 Freddy Mallet wrote:
I've updated the code the description [~ann.campbell.2]
=== on 11 Nov 2013, 12:55:03 Dinesh Bolkensteyn wrote:
I didn't get the double negation part of the title, "Sections should not be left undocumented".
I think "Sections should be documented" is much better.
=== on 13 Nov 2013, 12:06:27 Ann Campbell wrote:
Agreed, [~dinesh.bolkensteyn]
endif::env-github,rspecator-view[]