
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.
48 lines
889 B
Plaintext
48 lines
889 B
Plaintext
== Why is this an issue?
|
|
|
|
Jump statements (``++return++``, ``++break++`` and ``++continue++``) and ``++throw++`` expressions move control flow out of the current code block. So any statements that come after a jump are dead code.
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,javascript]
|
|
----
|
|
function fun(a) {
|
|
var i = 10;
|
|
return i + a;
|
|
i++; // Noncompliant; this is never executed
|
|
}
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,javascript]
|
|
----
|
|
function fun(int a) {
|
|
var i = 10;
|
|
return i + a;
|
|
}
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Remove this code after the "[return|break|continue|goto|throw]" statement.
|
|
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|