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

Add dotnet analyzers to .csproj #1386

Closed
wants to merge 2 commits into from
Closed

Add dotnet analyzers to .csproj #1386

wants to merge 2 commits into from

Conversation

alerickson
Copy link
Member

PR Summary

Add source code analysis to .csproj
see: https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview?tabs=net-6
and https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablenetanalyzers

PR Context

PR Checklist

@adityapatwardhan
Copy link
Member

https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview?tabs=net-7#treat-warnings-as-errors

Look at this. Treat warnings as errors. This causes build breaks.

@alerickson
Copy link
Member Author

@adityapatwardhan I assumed we'd want to treat warnings like errors so that we can address any issues immediately. Should we not treat warnings like errors?

@adityapatwardhan
Copy link
Member

I meant we want to have build breaks when there is a warning.

@alerickson
Copy link
Member Author

Perfect, just pushed that change

@alerickson
Copy link
Member Author

alerickson commented Aug 30, 2023

Closing for now since adding CodeAnalysisTreatWarningsAsErrors generates roughly 100+ errors 😅

Will address the errors and then add the changes from this PR.

@alerickson alerickson closed this Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants