47 lines
665 B
Plaintext
47 lines
665 B
Plaintext
== Why is this an issue?
|
||
|
||
include::../description.adoc[]
|
||
|
||
=== Noncompliant code example
|
||
|
||
[source,csharp]
|
||
----
|
||
if (Compare(point.X, point.X) != 0) // Noncompliant
|
||
{
|
||
//...
|
||
}
|
||
|
||
if (DoSomething(GetNextValue(), GetNextValue())) // Noncompliant
|
||
{
|
||
// ...
|
||
}
|
||
----
|
||
|
||
=== Compliant solution
|
||
|
||
[source,csharp]
|
||
----
|
||
if (Compare(point.X, point.Y) != 0)
|
||
{
|
||
//...
|
||
}
|
||
|
||
var v1 = GetNextValue();
|
||
var v2 = GetNextValue();
|
||
if (DoSomething(v1, v2))
|
||
{
|
||
// ...
|
||
}
|
||
----
|
||
ifdef::env-github,rspecator-view[]
|
||
|
||
'''
|
||
== Implementation Specification
|
||
(visible only on this page)
|
||
|
||
include::../message.adoc[]
|
||
|
||
include::../highlighting.adoc[]
|
||
|
||
endif::env-github,rspecator-view[]
|