-
Notifications
You must be signed in to change notification settings - Fork 29
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
Support use of MessageTemplateFormatMethod on extension methods #39
Comments
Sure, i'm happy to take a look at your fix 👍 |
GitSnafu
pushed a commit
to GitSnafu/SerilogAnalyzer
that referenced
this issue
Dec 12, 2018
…rk for extension methods decorated with MessageTemplateFormatMethod
Great, I've submitted a PR you can take a look at. Cheers! |
Suchiman
pushed a commit
that referenced
this issue
Dec 14, 2018
…xtension methods decorated with MessageTemplateFormatMethod
I've just pushed version 0.15 with your fix inside. Thanks again for the PR 👍 |
Thanks a lot. :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is similar to issue #19 but concerns extension methods and the Exception argument rule and is perhaps best illustrated by an example.
Given the above, the analyzer currently fails to report on the misplaced exception in cases such as these:
Given the current implementation this makes sense as the assumption is that the Exception parameter is at position one, which obviously isn't true in the case of an extension method. I've got a repro and proposed fix that I can push for you to look at and merge if you're happy with it.
Note that the missing property in the template string is still detected and reported.
Thanks for a great analyzer, it's really indispensable once you start using Serilog extensively.
The text was updated successfully, but these errors were encountered: