-
Notifications
You must be signed in to change notification settings - Fork 1
Use a modern and maintained Async analyzer #68
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
Conversation
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.
Missing:
- Delete folder: : https://github.com/atc-net/atc-coding-rules/tree/main/documentation/CodeAnalyzersRules/AsyncFixer
- Delete folder: https://github.com/atc-net/atc-coding-rules/tree/main/documentation/CodeAnalyzersRules/Asyncify
- Add folder: https://github.com/atc-net/atc-coding-rules/tree/main/documentation/CodeAnalyzersRules/MicrosoftVisualStudioThreadingAnalyzers
** with dummy_for_empty_folder.txt
@davidkallesen I have already done that - try:
and have a look |
The suggested new analyzer |
After LarsShovslund feedback - we need to investigate the dependency to VS
After reading Async code smells and how to track them down with analyzers - Part I and Async code smells and how to track them down with analyzers - Part II |
@davidkallesen agree - all three analysers are relevant! (I also found your link) - I will update the PR. |
I might have expressed myself wrongly in regards to |
@LarsSkovslund I do not agree, some of the rules are generally useful, as mentioned in the blog post linked above. |
Yes some of them are useful, but they will conflict with other async rules and/or suggest changes that are not appropriate for most projects unless you write Windows UI code. If we go through them one by one you will see these are target against STA/MTA issues or synchronizing with the UI thread. @ErikEJ would it be possible for you to point me in the direction of included rules that is not related to VS internals or UI programming (async void is in this category)? If the primary use-case for this analyzer is when writing Windows UI code, this should only be included there and not as a general requirement for all project types. |
@LarsSkovslund Sorry, I thought @davidkallesen had already linked to them above 😊 - https://cezarypiatek.github.io/post/async-analyzers-summary/ - as you can see in the summary there are 2-3 rules in the vs-threading rules that are useful. (You can always discuss each, for example VSTHRD200) |
PR updated |
Are you waiting for me to do anything here? |
(and avoid reported issues with older analyzers)I have used this in an ASP.NET Core 3.1/5/6 solution