dotnet / sdk

Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
https://dot.net/core
MIT License
2.65k stars 1.05k forks source link

[API Compat] unify error message style across rules #25564

Open smasher164 opened 2 years ago

smasher164 commented 2 years ago

Some error messages have lengthier prose, like VisitorRightCountShouldMatchMappersSetSize with The provided right count when creating the visitor should match the right set size specified for the mappers. Others, on the other hand, are terse while being precise about the symbol that was affected, like TypeExistsOnLeft with Type '{0}' exists on {1} but not on {2}.

It might be worth unifying these styles. /cc @joperezr

Thiago-Bastani commented 1 year ago

Where are those error messages defined? I'd like to take a look on it.

ViktorHofer commented 1 year ago

In all the rules in this directory: https://github.com/dotnet/sdk/tree/main/src/ApiCompat/Microsoft.DotNet.ApiCompatibility/Rules.

The actual strings are defined in the project's Resources.resx file.

Thiago-Bastani commented 1 year ago

Pull request: #33084