EditorConfig
A plain-text .editorconfig file that records a repository's coding style, and in .NET also the severity of each analyzer rule, for editors and the build to apply.
In more detail
root = true stops editors merging settings from parent folders. Sections such as [*.cs] apply only to matching files, and dotnet_diagnostic.CA2000.severity = warning sets one rule's severity.
Example
dotnet_diagnostic.CA2000.severity = warningRelated terms
- Roslyn analyzer — A plug-in to the C# compiler that inspects code while you edit and build, and reports diagnostics about likely bugs, unsafe patterns or style.
- diagnostic severity — The level at which a rule reports, from none and suggestion through warning to error.
- dotnet format — The dotnet command that applies the repository's EditorConfig style and analyzer fixes to code.
Taught in
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Code Quality: .editorconfig and Roslyn Analyzers — Modern .NET Core, C# & Enterprise Microservices