generated code
Source code written by a tool, such as a source generator or scaffolder, rather than by a person.
In more detail
It should be regenerated rather than edited by hand, because the next generation overwrites changes. Analyzer rules can be relaxed for generated files through a generated-code section in EditorConfig, since your team does not maintain them by hand.
Related terms
- source generator — A compiler plug-in that writes extra C# code during the build, based on the code you wrote.
- 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.
Taught in
- Code Quality: .editorconfig and Roslyn Analyzers — Modern .NET Core, C# & Enterprise Microservices
- Source-Generated Mapping with Mapperly — Modern .NET Core, C# & Enterprise Microservices