-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA1062 should no longer suggest to use Code Contracts. #3134
Comments
Isn't stuff like I understand the assembly rewriter and realtime analyzer are completely deprecated, but these libraries that are part of the framework could still be seen as "Code Contracts", couldn't they? |
Without runtime checking, suggesting to -
do not have the same result, which is to fix violations as mentioned in the CA1062 docs:
If the rule read "CA1062: Suggest to callers not to pass a null argument" then it would be fine. The docs also don't mention Code Contracts at all. |
@kmgallahan Just to confirm I got all of your suggestions right. You'd like to have the doc website updated to also mention @mavasani Are you fine with these changes? |
@Evangelink @mavasani There are 3 problems:
In my opinion there should be zero suggestions to use a dead project that doesn't work with VS 2017/2019, therefore the rule as it appears when broken in VS should not read:
Further, suggesting to use In my opinion either one of these needs to be done: A. If the rule documentation continues to mention Bottom line: if the goal is to enforce run-time null checking, then mentioning contracts in any form is not helpful. |
+1, I don't think |
Analyzer package
Microsoft.CodeAnalysis.FxCopAnalyzers
Package Version
v2.9.8 (Latest)
Diagnostic ID
Example: CA1062
Suggestion
The description currently includes:
The Code Contract project is no longer being developed, and this rule should not recommend that it be used.
The text was updated successfully, but these errors were encountered: