postsharp / Metalama.Patterns

An open-source, professionally-built and fully supported library of Metalama aspects.
https://www.postsharp.net/metalama
Other
19 stars 1 forks source link

Redundant "strictly" word in exception message when DefaultInequalityStrictness = InequalityStrictness.Strict #150

Closed XtroTheArctic closed 2 months ago

XtroTheArctic commented 2 months ago

I have this definition in my root Atesh.Metalama library.

using Metalama.Framework.Fabrics;
using Metalama.Patterns.Contracts;

namespace Atesh.Metalama;

class InequalityStrictnessFabric : TransitiveProjectFabric
{
    public override void AmendProject(IProjectAmender Amender) => Amender.ConfigureContracts(new() { DefaultInequalityStrictness = InequalityStrictness.Strict });
}

When I use this library in another test library where I test parameter validations on some of my methods, the exception message contains a redundant "strictly" word.

image

gfraiteur commented 2 months ago

Okay I will ignore this for now as a matter of preferences. If you want to change the exception message, you can override the template.