How we enforce .NET coding standards to improve productivity
9 months ago
- #.NET
- #Software Development
- #Code Quality
- Organizations aim to optimize their Software Development Life Cycle (SDLC) for faster delivery and better quality.
- Workleap analyzed their SDLC to reduce friction and improve developer efficiency without compromising quality.
- Identified inconsistencies in code style, quality, and performance across multiple .NET solutions and C# projects.
- Found that code style issues in pull requests negatively impacted cycle time and developer relationships.
- Discovered build-time warnings and MSBuild-related issues, such as disabled nullable reference types and minimal Roslyn analysis levels.
- Developed a reusable .NET coding standards NuGet package to enforce code style, quality, and performance standards.
- Configured over 800 Roslyn analysis rules and MSBuild properties for consistent, performant builds.
- Enabled automatic code fixes and ensured minimal build duration impact.
- Adopted a 'positive shaming' approach to encourage adoption, resulting in widespread migration across projects.
- Benefits include reduced code review time, improved code quality, and faster builds.
- The .NET coding standards package is open source and available on GitHub and NuGet.org.