Skip to content

Commit 3a894df

Browse files
authored
Update PureAttribute documentation to mention CA1806 analyzer enforcement (#11949)
1 parent 5524c68 commit 3a894df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System.Diagnostics.Contracts/PureAttribute.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<format type="text/markdown"><![CDATA[
5757
5858
## Remarks
59-
Methods and types that are marked with this attribute can be used in calls to <xref:System.Diagnostics.Contracts.Contract?displayProperty=nameWithType> methods. Pure methods do not make any visible state changes. This attribute is not enforced by the current analysis tools; you should use this attribute only if you are sure that the methods are pure.
59+
Methods and types that are marked with this attribute can be used in calls to <xref:System.Diagnostics.Contracts.Contract?displayProperty=nameWithType> methods. Pure methods do not make any visible state changes. The [CA1806](/dotnet/fundamentals/code-analysis/quality-rules/ca1806) code analyzer checks for this attribute and emits a diagnostic when the return value of a pure method isn't used.
6060
6161
]]></format>
6262
</remarks>

0 commit comments

Comments
 (0)