rspec/rules/S2998/rule.adoc
Egon Okerman d1417e82f8
Modify CWE and OWASP Top 10 links to follow standard link format (APPSEC-1134) (#3529)
* Fix all CWE references

* Fix all OWASP references

* Fix missing CWE prefixes
2024-01-15 17:15:56 +01:00

36 lines
993 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
* CWE - https://cwe.mitre.org/data/definitions/482[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[]