rspec/rules/S3603/description.adoc

6 lines
420 B
Plaintext
Raw Permalink Normal View History

2023-07-03 15:45:51 +02:00
== Why is this an issue?
Marking a method with the https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.contracts.pureattribute[`Pure`] attribute indicates that the method doesn't make any visible state changes. Therefore, a `Pure` method should return a result. Otherwise, it indicates a no-operation call.
2023-07-03 15:45:51 +02:00
Using `Pure` on a `void` method is either by mistake or the method is not doing a meaningful task.