
When an include is not surrounded by empty lines, its content is inlined on the same line as the adjacent content. That can lead to broken tags and other display issues. This PR fixes all such includes and introduces a validation step that forbids introducing the same problem again.
51 lines
850 B
Plaintext
51 lines
850 B
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Noncompliant code example
|
|
|
|
With the default threshold of 3:
|
|
|
|
[source,python]
|
|
----
|
|
def fun(): # Noncompliant as there are 4 return statements
|
|
if condition1:
|
|
return True
|
|
elif condition2:
|
|
return False
|
|
else:
|
|
return True
|
|
return False
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
This [method|function] has n returns or yields, which is more than the m allowed.
|
|
|
|
|
|
include::../parameters.adoc[]
|
|
|
|
=== Highlighting
|
|
|
|
* Primary: on the function name
|
|
* Secondary: on ``++return++`` statements
|
|
message should be one of:
|
|
|
|
** "return" statement.
|
|
** "yield" statement.
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|