PurityAnalyzer icon indicating copy to clipboard operation
PurityAnalyzer copied to clipboard

Support the [Pure] attribute from System.Diagnostics.Contracts

Open sonnemaf opened this issue 3 years ago • 2 comments

Can the analyzer also work with the [Pure] attribute from System.Diagnostics.Contracts?

I don't want to introduce an extra [IsPure] attribute. There is one already in the framework. I would prefer to use that one. A lot of OSS projects have annotated there code with the [Pure] attribute. I want to use this analyzer to check their implementation.

Thanks,

Fons

sonnemaf avatar Jan 20 '21 10:01 sonnemaf

There are problems with the Pure attribute from the BCL. Please take a look at this:

https://github.com/ymassad/PurityAnalyzer/pull/5

ymassad avatar Jan 20 '21 19:01 ymassad

Can you make it a setting? This would allow users to still use the [Pure] attribute. I would prefer to have this setting stored in the .editorconfig file.

sonnemaf avatar Jan 21 '21 07:01 sonnemaf