Content-Length: 637766 | pFad | http://github.com/dotnet/winforms/pull/13566/files

06 Cleanup AvoidPassingTaskWithoutCancellationTokenAnalyzer by Youssef1313 · Pull Request #13566 · dotnet/winforms · GitHub
Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Comment on lines +4 to +8
Copy link
Member Author

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 in System.Windows.Forms.Analyzers. So this is okay and is clarified in the "Notes" column.

Original file line number Diff line number Diff line change
Expand Up @@ -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&lt;T&gt;` 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&lt;CancellationToken, ValueTask&gt;` or `Func&lt;CancellationToken, ValueTask&lt;T&gt;&gt;`, 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
Copy link
Member Author

Choose a reason for hiding this comment

The 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>
Expand All @@ -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.

Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/dotnet/winforms/pull/13566/files

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy