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

Refactor code to remove analyzer warnings #90

Closed
1 of 4 tasks
rjmurillo opened this issue Jun 14, 2024 · 0 comments · Fixed by #113 or #242
Closed
1 of 4 tasks

Refactor code to remove analyzer warnings #90

rjmurillo opened this issue Jun 14, 2024 · 0 comments · Fixed by #113 or #242
Assignees
Labels
housekeeping .NET Pull requests that update .net code triage
Milestone

Comments

@rjmurillo
Copy link
Owner

rjmurillo commented Jun 14, 2024

In #89 new analyzers are added. This issue is keeping track of the issues flagged by the newly added analyzers

The suppressions added so we can be clean for #26

rjmurillo added a commit that referenced this issue Jun 17, 2024
Several changes:

1. Add several new analyzers to check for code correctness and style

- [Sonar](https://www.nuget.org/packages/SonarAnalyzer.CSharp)
-
[Multithreading](https://www.nuget.org/packages/Microsoft.VisualStudio.Threading.Analyzers)
- [C#
Guidelines](https://www.nuget.org/packages/CSharpGuidelinesAnalyzer)
- [Exhaustive
matching](https://www.nuget.org/packages/ExhaustiveMatching.Analyzer)

2. Added suppressions for some of the new rules as they'll need more
extensive refactoring to satisfy (e.g., methods have multiple
responsibilities, there's too much coupling, poor encapsulation, etc.).
Tracked in #90
3. Bump Meziantou.Analyzer to 2.0.157
@rjmurillo rjmurillo added the .NET Pull requests that update .net code label Jun 18, 2024
rjmurillo added a commit that referenced this issue Jun 19, 2024
- Updated `.editorconfig` to set policy on some duplicate warnings for
TODO. Borrowed from #89 to make merging easier
- Added suppressions for analyzers that seem to be misfiring. Tracked in
#90
- Updated cases where nullability was incorrect (something could be
passed as null but wasn't, something was marked as nullable but wasn't).
Where possible added asserts so we can catch cases when they arise.
- Removed `<NoWarn>` from `Moq.Analyzers.csproj`
- Added `<TreatWarningsAsErrors>` and `MSBuildTreatWarningsAsErrors`
elements to `CodeAnalysis.props`
@rjmurillo rjmurillo self-assigned this Jun 22, 2024
@rjmurillo rjmurillo added this to the vNext milestone Jun 22, 2024
rjmurillo added a commit that referenced this issue Jun 24, 2024
Fixes suppressed warnings for AV1708
Related to #90
@rjmurillo rjmurillo linked a pull request Jun 24, 2024 that will close this issue
@rjmurillo rjmurillo reopened this Jun 24, 2024
@rjmurillo rjmurillo modified the milestones: v0.1.1, v0.2.0 Jun 28, 2024
@rjmurillo rjmurillo modified the milestones: v0.2.0, vNext Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping .NET Pull requests that update .net code triage
Projects
None yet
1 participant