SONARGO-126 S1764 Improve RSPEC to cover a check for NaN (#4738)
This commit is contained in:
parent
d204203515
commit
db6114afab
@ -2,6 +2,10 @@
|
||||
|
||||
include::../description.adoc[]
|
||||
|
||||
Note that this rule will raise issues on ``++a == a++`` and ``++a != a++`` expressions which are sometime used to detect ``++NaN++`` values.
|
||||
It is recommended to use instead https://pkg.go.dev/math#IsNaN[``++math.IsNaN()++``] or an equivalent function.
|
||||
This will improve code readability.
|
||||
|
||||
=== Noncompliant code example
|
||||
|
||||
[source,go]
|
||||
|
Loading…
x
Reference in New Issue
Block a user