-
Notifications
You must be signed in to change notification settings - Fork 731
Use the C# identifier from the calling code in the failure message instead of a generic name #705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the C# identifier from the calling code in the failure message instead of a generic name #705
Conversation
d65cb78 to
0ebf088
Compare
|
|
||
| private static bool UsesNewKeyword(string candidate) | ||
| { | ||
| return new Regex(@"new(\s?\[|\s?\{|\s\w+)").IsMatch(candidate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just nitpicking, but you could use the static Regex.IsMatch which caches the regex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I still have to clean up the code. Currently focusing on getting all tests green.
a243fe1 to
1ffa97d
Compare
66d37df to
3f76d50
Compare
82da703 to
f023f57
Compare
eb5c70a to
33c1255
Compare
33c1255 to
b38a555
Compare
|
Is |
|
I used it for diagnostic purposes and plan to keep it in in case it misbehaves. Have to think of a way to make it available as part of the tracing functionality of the |
|
Ok. |
|
Yeah, thanks for reminding me about that one. |
See #588
Order of precedence
{identifier:fallback}placeholderWithDefaultIdentifier