server
server copied to clipboard
PROPOSAL: Use File Scoped Namespaces
Type of change
- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
Objective
In C# 10 you can now define file scoped namespaces which turn the namespace declaration into a single line statement and no need to indent it. This saves us 4 spaces horizontally. If this PR is merged it will need to be added to the .git-blame-ignore-revs.
Code changes
- .editorconfig: Add a setting to prefer file scoped namespaces at a warning level.
- All other changes were made from using
dotnet format
Before you submit
- [x] I have checked for formatting errors (`dotnet format --verify-no-changes`) (required)
- [ ] If making database changes - I have also updated Entity Framework queries and/or migrations
- [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required)
- [ ] This change requires a **documentation update** (notify the documentation team)
- [ ] This change has particular **deployment requirements** (notify the DevOps team)
Reason for hold: To have an internal discussion about whether we want to adopt this.
I'm happy with this change as well! Probably easier to re-run the changes on the latest master though.