Skip to content
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

Fix analyzer warnings #202

Open
JamieMagee opened this issue Aug 16, 2022 · 0 comments
Open

Fix analyzer warnings #202

JamieMagee opened this issue Aug 16, 2022 · 0 comments
Labels
good first issue Good for newcomers status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code

Comments

@JamieMagee
Copy link
Member

JamieMagee commented Aug 16, 2022

This is an overarching issue to track analyzer warnings that are currently silenced. To fix a single warning:

  1. Remove the warning silence from .editorconfig
  2. Run a build locally
  3. Fix any warnings that are emitted
  4. Create a pull request
  5. Link it to this issue
  6. Once merged check the relevant box below
Table of Contents
  • StyleCop.Analyzers
  • Microsoft.VisualStudio.Threading.Analyzers
  • Roslyn
  • Introduced with .NET 6 migration
    • Language rules
    • Code quality rules
    • StyleCop.Analyzers

StyleCop.Analyzers

Microsoft.VisualStudio.Threading.Analyzers

  • VSTHRD002
    • Synchronously waiting on tasks or awaiters may cause deadlocks. Use await or JoinableTaskFactory.Run instead.
  • VSTHRD103
    • Result synchronously blocks. Use await instead.
  • VSTHRD101
    • Avoid using async lambda for a void returning delegate type, because any exceptions not handled by the delegate will crash the process
  • VSTHRD104
    • Expose an async version of this method that does not synchronously block. Then simplify this method to call that async method within a JoinableTaskFactory.Run delegate.
  • VSTHRD111
    • Add .ConfigureAwait(bool) to your await expressio
  • VSTHRD200

Roslyn

  • CS0618
    • '...' is obsolete
  • CS1591
    • Missing XML comment for publicly visible type or member '...'

Introduced with .NET 6 migration

Language rules

Code quality rules

StyleCop.Analyzers

@JamieMagee JamieMagee added good first issue Good for newcomers status:ready Ready to start implementation type:refactor Refactoring or improving of existing code labels Aug 16, 2022
JamieMagee added a commit that referenced this issue Aug 16, 2022
JamieMagee added a commit that referenced this issue Aug 16, 2022
JamieMagee added a commit that referenced this issue Aug 16, 2022
@JamieMagee JamieMagee self-assigned this Aug 16, 2022
@JamieMagee JamieMagee added status:in-progress Someone is working on implementation and removed status:ready Ready to start implementation labels Aug 16, 2022
JamieMagee added a commit that referenced this issue Aug 16, 2022
JamieMagee added a commit that referenced this issue Aug 17, 2022
JamieMagee added a commit that referenced this issue Aug 19, 2022
JamieMagee added a commit that referenced this issue Aug 20, 2022
Related to #202

Using directive for '...' should appear before directive for '...'
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1208.md
JamieMagee added a commit that referenced this issue Aug 20, 2022
AdamPlaskitt added a commit to AdamPlaskitt/component-detection that referenced this issue Aug 28, 2022
amitla1 added a commit that referenced this issue Sep 1, 2022
* Related to #202

Block statements should not contain embedded comments
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1108.md

* Remove trailing whitespace warning

Co-authored-by: amitla1 <[email protected]>
AdamPlaskitt added a commit to AdamPlaskitt/component-detection that referenced this issue Sep 3, 2022
This was referenced Sep 9, 2022
@JamieMagee JamieMagee pinned this issue Oct 20, 2022
JamieMagee added a commit that referenced this issue Oct 21, 2022
@melotic melotic mentioned this issue Jan 30, 2023
25 tasks
@cobya cobya unpinned this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers status:in-progress Someone is working on implementation type:refactor Refactoring or improving of existing code
Projects
Development

No branches or pull requests

1 participant