Skip to content

Implement a Analyzers similar to dotnet/runtime and use their ruleset #5655

@elachlan

Description

@elachlan

dotnet/runtime has analyzers implemented to help reduce code issues and have put together a decent list of rules.

https://github.com/dotnet/runtime/blob/master/eng/CodeAnalysis.ruleset

I suggest the rules and the analyzers are duplicated here in msbuild to help enforce code style and reduce potential errors. It will also help make PRs higher quality, reducing the burden on reviewers for trivial issues.

We could have the rules set to "info" so they don't cause build failures. Then enable each rule one by one over time so that the changes are isolated to a PR/commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: DebuggabilityIssues impacting the diagnosability of builds, including logging and clearer error messages.Refactoringtriaged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions