-
Notifications
You must be signed in to change notification settings - Fork 8
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
Introduce formatting and analyzers #36
Conversation
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with |
…TAnalyzers>true</EnableNETAnalyzers>
Hmm...I had set this up to use https://github.com/dotnet/code-analysis, but that repository hasn't been updated in 3 years and does not run on .NET 8. I believe it to be abandoned and I don't want to run on a super old version of .NET just to use an old analysis tool. Instead, I'll focus on using the built-in Roslyn analyzers. |
I've implemented the following snippet in our
This explicltly enables .NET analyzers (though they're on by default because we use .NET 8) and treats warnings as errors. I've ignored all CS0618 "Obsolete" errors since Kiota expectedly generates some code with "Obsolete" modifiers. Together with our CodeQL analysis Action, this should cover all necessary linting pieces for our dotnet-sdk. |
This project already has an
.editorconfig
courtesty of #15. This PR adds a CI check and a script that can be used locally, both of which calldotnet format
to ensure our source files are compliant with the.editorconfig
.