rspec/rules/S109/abap/rule.adoc

41 lines
687 B
Plaintext
Raw Normal View History

2020-06-30 10:16:44 +02:00
include::../description.adoc[]
include::../how-to-fix-it.adoc[]
=== Code examples
==== Noncompliant code example
2020-06-30 10:16:44 +02:00
[source,abap,diff-id=1,diff-type=noncompliant]
2020-06-30 10:16:44 +02:00
----
IF sy-subrc EQ 42. " Noncompliant - 5 is a magic number
screen-request = 'OK'.
2020-06-30 10:16:44 +02:00
ENDIF.
----
==== Compliant solution
2020-06-30 10:16:44 +02:00
[source,abap,diff-id=1,diff-type=compliant]
2020-06-30 10:16:44 +02:00
----
answer = 42.
IF sy-subrc EQ answer. " Compliant
screen-request = 'OK'.
2020-06-30 10:16:44 +02:00
ENDIF.
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]