You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sebastien-marichal
changed the title
Docs: The compliant/non-compliant code examples for csharpsquid:S2365 are incorrect
Rule S2365: Fix code examples in RSPEC
May 7, 2024
In the documentation for the csharpsquid:S2365 rule, both code examples in the "How can I fix it?" section are incorrect.
The noncompliant example says it makes an "expensive ToList call", but no such call is made.
Both solutions try to call
Clone()
on aList<>
, but no such method exists, and even if it did, casting to astring[]
would likely not work.Looks like the author rushed through this one and didn't complete the examples correctly.
The text was updated successfully, but these errors were encountered: