-
Notifications
You must be signed in to change notification settings - Fork 790
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
Expand warning when expression result is ignored #1235
Conversation
This looks good. Could you please add a new test case under tests\fsharpqa\Source\Warnings that contains your sample from the screenshot? Thanks |
Great stuff! 2 questions: -
|
I think "Use the ignore function" is what we would want to put into the "consider" part ("Consider to use the ignore function..."). |
@forki yeah, exactly - there should be some description of why "throwing away" a result is considered "bad form" in F# and why this is potentially a code smell. This will probably lead to a longer warning message than @KevinRansom would like though :-) |
@forki @isaacabraham I'm having trouble coming up with an explanation that isn't made redundant by the "consider" suggestions. Also, there are interop scenarios where
|
No we don't think ignore is bad. |
@forki agreed. If we can settle on some reasonable message, I'll push another commit. |
Lol bikeshedding. I think this probably works okay:
|
Updated message from @KevinRansom's suggestion and added test re: @forki |
@taylorwood, Hi mate, did you push your latest updates to the messages? Thanks |
@KevinRansom yes, I used your suggestion for the message in the last commit |
This LGTM. |
@taylorwood This looks great, Thanks for taking care of this. Kevin |
👍 |
These changes attempt to address #1108. I ended up using a combination of the suggestions from the issue discussion, but am happy to change per feedback.