rspec/rules/S2998/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
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.
2023-05-25 14:18:12 +02:00

36 lines
994 B
Plaintext

== Why is this an issue?
A statement without side effects, such as creating an object without assigning its reference to a variable, is useless, and must have been a mistake on the developer's part.
== Resources
* https://cwe.mitre.org/data/definitions/482[MITRE, CWE-482] - Comparing instead of Assigning
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Refactor or remove this statement which has no side-effects.
'''
== Comments And Links
(visible only on this page)
=== on 4 Jun 2015, 12:01:48 Linda Martin wrote:
Such rule is covered by PyLint (\http://pylint-messages.wikidot.com/messages:w0104) and Google Closure (JSC_USELESS_CODE : \https://developers.google.com/closure/compiler/docs/error-ref).
=== on 5 Jun 2015, 12:10:19 Ann Campbell wrote:
looks like I forgot to assign this back to you for review [~linda.martin]
=== on 11 Jun 2015, 08:18:21 Linda Martin wrote:
OK!
endif::env-github,rspecator-view[]