-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add Contract.Requires(!String.IsNullOrEmpty(arg)) action #49
Comments
Didn't get this. Quick fix mean the fix for some code issue. Or you mean conversion from |
I mean the action in the R# menu on the left side (Alt+Enter), when you point on a method parameter. As for now, there is only one option available from the extension: "Requires 'arg' is not null", that produces |
What would be really cool:
What also would be nice is to have a code inspection based on the preference chosen in the extension options. Background: if the user means he mostly wants to check for empty strings (instead of null references), the inspection would highlight the opposite usages. It shouldn't be very obtrusive, however ("suggestion" would suffice). |
I'll additional context action and will use default action based on the configuration settings in the upcoming release. And will create additional task for your remaining suggestions. They're more complex to implement so I'll add them in one of the upcoming versions. |
Please provide the above menu action (which would correspond to the Code Contracts
'crsn'
snippet).The text was updated successfully, but these errors were encountered: