Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace legacy StyleCop(Plus) with StyleCopAnalyzers #16506
This PR migrates our custom OpenRA.StyleCheck.exe / StyleCopPlus plumbing to StyleCopAnalyzers, making the most of our recent switch to the Roslyn compiler (#16345) and the csproj
StyleCopAnalyzers has some big advantages over StyleCopPlus:
The checks are run by the compiler, rather than a separate task, and trigger compilation errors.
Rather than try to reverse-engineer our old configuration (the StyleCopPlus UI is defunct), I started from scratch with a blank profile and disabled rules one by one until the checks passed. There were several rules that only had one or two failures, so I fixed these violations in the code rather than disabling the rules. I divided and documented the rest into categories for things we definitely want to keep disabled, vs things that we could potentially enable in the future once someone fixes the existing violations.
There are a couple of disabled rules that I strongly agree with, so I may follow this up later with one or more further PRs to fix and enable them.
I expect this to be the last blocker for updating the Mod SDK to work with the recent build system / packaging changes.