
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.
65 lines
1.2 KiB
Plaintext
65 lines
1.2 KiB
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,csharp]
|
|
----
|
|
if (param == 1)
|
|
{
|
|
OpenWindow();
|
|
}
|
|
else if (param == 2)
|
|
{
|
|
CloseWindow();
|
|
}
|
|
else if (param == 1) // Noncompliant
|
|
{
|
|
MoveWindowToTheBackground();
|
|
}
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,csharp]
|
|
----
|
|
if (param == 1)
|
|
{
|
|
OpenWindow();
|
|
}
|
|
else if (param == 2)
|
|
{
|
|
CloseWindow();
|
|
}
|
|
else if (param == 3)
|
|
{
|
|
MoveWindowToTheBackground();
|
|
}
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 25 Mar 2015, 16:03:23 Tamas Vajk wrote:
|
|
\[~ann.campbell.2] should I add the See section for C# as well?
|
|
|
|
=== on 25 Mar 2015, 16:24:48 Ann Campbell wrote:
|
|
\[~tamas.vajk] these language-specific subtasks override portions of their parent tasks, and the description field is treated as 5 separate parts: description, Noncompliant Code Example, Compliant Solution, Exceptions, and references (See). There's no need to copy/paste the references to this child ticket, but do include them in the implementation's rule description.
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|