rspec/rules/S2998/rule.adoc

36 lines
993 B
Plaintext
Raw Permalink Normal View History

== 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
* CWE - https://cwe.mitre.org/data/definitions/482[CWE-482 - Comparing instead of Assigning]
2022-01-25 18:36:46 +01:00
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Refactor or remove this statement which has no side-effects.
2022-01-25 18:36:46 +01:00
'''
== 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!
2022-01-25 18:36:46 +01:00
endif::env-github,rspecator-view[]