-
Notifications
You must be signed in to change notification settings - Fork 1k
Cleanup AvoidPassingTaskWithoutCancellationTokenAnalyzer #13566
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
; Unshipped analyzer release | ||
; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md | ||
|
||
### Removed Rules | ||
|
||
Rule ID | Category | Severity | Notes | ||
--------|----------|----------|-------------------- | ||
WFO2001 | WinForms Usage | Warning | CSharpDiagnosticDescriptors, [Documentation](https://aka.ms/winforms-warnings/wfo2001) - analyzer is moved from C# layer to language agnostic layer. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,15 +156,6 @@ | |
<data name="AddDesignerSerializationVisibilityCodeFixTitle" xml:space="preserve"> | ||
<value>Add DesignerSerializationVisibilityAttribute to property</value> | ||
</data> | ||
<data name="WFO2001AnalyzerTitle" xml:space="preserve"> | ||
<value>Task is being passed to `InvokeAsync` without a cancellation token</value> | ||
</data> | ||
<data name="WFO2001AnalyzerDescription" xml:space="preserve"> | ||
<value>Avoid passing a `Func<T>` to `InvokeAsync` where `T` is a `Task` or `ValueTask`, unless your intention is for the delegate to simply be kicked off as an unsupervised task. Instead, use `Func<CancellationToken, ValueTask>` or `Func<CancellationToken, ValueTask<T>>`, so that the delegate passed to `InvokeAsync` can be awaited, allowing exceptions to be properly handled.</value> | ||
</data> | ||
<data name="WFO2001AnalyzerMessageFormat" xml:space="preserve"> | ||
<value>Task is being passed to `InvokeAsync` without a cancellation token</value> | ||
</data> | ||
Comment on lines
-159
to
-167
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are moved to resources of System.Windows.Forms.Analyzers. |
||
<data name="WFO1001AnalyzerMessageFormat" xml:space="preserve"> | ||
<value>Type `{0}` does not implement `ITypedDataObject` interface</value> | ||
</data> | ||
|
@@ -174,4 +165,4 @@ | |
<data name="WFO1001AnalyzerDescription" xml:space="preserve"> | ||
<value>Types should implement `ITypedDataObject` to support best practices when interacting with data. Types will not work with typed APIs in Clipboard and other data exchange scenarios if they only implement `IDataObject`.</value> | ||
</data> | ||
</root> | ||
</root> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding comments to help make the review easier.
This section is required due to how the releasing tracking analyzer works. The analyzer is removed from
System.Windows.Forms.Analyzers.CSharp
, but exists now inSystem.Windows.Forms.Analyzers
. So this is okay and is clarified in the "Notes" column.