dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.73k stars 3.18k forks source link

Style: Error SA1514 Element documentation header should be preceded by blank line #28187

Closed donhuvy closed 2 years ago

donhuvy commented 2 years ago

.NET 6.0.300

dotnet add package Microsoft.EntityFrameworkCore.Design

dotnet add package Microsoft.EntityFrameworkCore.SqlServer

dotnet ef dbcontext scaffold "Server=VYPC\MISASME2022;Database=MISASME2022Sample;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -o Models
Severity    Code    Description Project File    Line    Suppression State
Error   SA1514  Element documentation header should be preceded by blank line   Domain  C:\Users\donhu\source\repos\FSH\src\Core\Domain\Entities\Catalog\Account.cs 223 Active

image

image

Related https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1517.md

ErikEJ commented 2 years ago

Or disable code analysis from generated code?

donhuvy commented 2 years ago

Because has other XML documents not belong to automated generated XML documents. I think add empty line below XML document is more suitable. Update: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/

(2) I add more information: StyleCopAnalyzers from this project https://github.com/fullstackhero/dotnet-webapi-boilerplate/issues/703 also require . (dot) at the end of XML doc. For example

This is a regular doc

will cause error.

StyleCopAnalyzers from this project https://github.com/fullstackhero/dotnet-webapi-boilerplate/issues/703 also require

This is a regular doc.

have . (dot) at the end of doc will not cause error.

But I have little experience in C# / .NET development. Please consider this fact from your side.