SS3D
SS3D copied to clipboard
Adds stylecop base scripts to support coding rules enforcement
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
- [ ] The game builds properly without errors.
- [ ] No unrelated changes are present.
- [ ] No "trash" files are committed.
- [ ] Relevant code is documented.
- [ ] Update the related GitBook document, or create a new one if needed.
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.