-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The goal is to implement the following behavior:
- Inspect every string interpolation on the project.
- Get the type of the parameter. Continue only if it is an interpolated string handler as oppose to
System.String. - Connect
$"foo"and$"{foo:foo}"ontoAppendFormattedandAppendLiteraloverloads, respectively.- Check if the parameter of
AppendFormattedandAppendLiteralhas aMatchattribute, if it does, match it against the interpolation. - If it doesn't, check the parameter types of the function. If a parameter has an implicit conversion to either
System.String(forvalueandformat) orSystem.Int32(foralignment).- Go to the type's implicit conversion function and get the parameters.
- For each parameter, get the attributes for
Match. - If they exist, test each
Matchagainst the literal value that was passed into the specific expression of the string interpolation.
- Check if the parameter of
This is a very complicated spec, and as such will likely take a very long time to implement.
Tests have already been added, which at the time of writing is currently failing: 45311dd
Once all tests pass, version 2.1 will be released, assuming no other breaking features are rolled out.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request