rspec/rules/S1654/abap/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

38 lines
860 B
Plaintext

== Why is this an issue?
Shared naming conventions allow teams to collaborate efficiently. This rule checks that all method parameters follow a naming convention.
=== Noncompliant code example
Using the default importing and returning regular expressions ``++I_[a-zA-Z_\-0-9]+++``, and ``++R_[a-zA-Z_\-0-9]+++``:
[source,abap]
----
METHODS m_fact IMPORTING i1 TYPE i
value(i2) TYPE i
RETURNING value(factorial) TYPE i.
----
=== Compliant solution
[source,abap]
----
METHODS m_fact IMPORTING I_1 TYPE i
value(i2) TYPE i
RETURNING value(R_factorial) TYPE i.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../parameters.adoc[]
endif::env-github,rspecator-view[]