RE-SS3D / SS3D

Space Station 3D, another remake of SS13, but with an extra D.
https://ss3d.space/
249 stars 138 forks source link

Adds stylecop base scripts to support coding rules enforcement #1428

Closed joaoburatto closed 1 week ago

joaoburatto commented 5 months ago

Summary

This PR adds two main things, the base framework to support code analyzers and thus preventing the Unity engine to compile code that is not conformant to our standards, and adds the rules that determines those standards.

Note that, at this time, all the rules are set as hidden or warning. I have added two rules, one for all SS3D scripts and one for external scripts. External scripts should be free of any code analysis, as we shouldn't modify them to fit our definitions.

Currently all SS3D rules are either hidden or warning for a reason, modifying all scripts to conform the new norm would probably create another gigantic PR from me or break the entire codebase. So from now on, there will be many PRs enabling one code analyzer as error per PR.

PR checklist

Testing

There's not much testing here. But you can test the analyzers by changing one of the rulesets and seeing if the code is analyzer according to that change.

Changes

I modified the logic of RuleSetManager to support two ruleset files.