OneSignal-Xamarin-SDK
OneSignal-Xamarin-SDK copied to clipboard
Add StyleCop tool for lint and formatting
Description
One Line Summary
Add StyleCop tool for lint and formatting.
Details
Motivation
To improve code quality and readability.
Scope
Only enables this as warnings for now.
Testing
Manual testing
Tested on Visual Studio 2022 for Mac (17.4 build 715), ensured new warnings show after building.
Affected code checklist
- [ ] Notifications
- [ ] Display
- [ ] Open
- [ ] Push Processing
- [ ] Confirm Deliveries
- [ ] Outcomes
- [ ] Sessions
- [ ] In-App Messaging
- [ ] REST API requests
- [ ] Public API changes
Checklist
Overview
- [X] I have filled out all REQUIRED sections above
- [X] PR does one thing
- If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
- [X] Any Public API changes are explained in the PR details and conform to existing APIs
Testing
- [X] I have included test coverage for these changes, or explained why they are not needed
- [X] All automated tests pass, or I explained why that is not possible
- [X] I have personally tested this on my device, or explained why that is not possible
Final pass
- [X] Code is as readable as possible.
- Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
- [X] I have reviewed this PR myself, ensuring it meets each checklist item
- WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.
Should we add a common stylecop.json
file in the repo to support configuration? https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/Configuration.md