Skip to content
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

False positive naming warning #4

Closed
vilinski opened this issue Jan 31, 2020 · 2 comments
Closed

False positive naming warning #4

vilinski opened this issue Jan 31, 2020 · 2 comments

Comments

@vilinski
Copy link

  • Rider 2019.3.1
  • Structured Logging 2019.3.1.59
  • Windows 10 x64

The following code

var newItem = 42;
_logger.LogError("Answer is {newItem}", newItem);

emits a warning about property naming (false positive)

Property name 'newItem' does  not naming rules'. Suggested name is 'NewItem'.

The warning disappears if plugin is deactivated.

@olsh
Copy link
Owner

olsh commented Jan 31, 2020

Well, this is a new rule implemented in the latest version.
https://github.com/olsh/resharper-structured-logging/blob/master/rules/InconsistentLogPropertyNaming.md

By default suggested property name should be PacalCase. The naming may be configured in the extension settings (only in R# at the moment).
image

Sadly I have no time to implement it in Rider. PR is welcome. :)

The only workaround for you is to configure the rule in R# and save to Team Shared settings or disable the rule solution-wide.

@vilinski
Copy link
Author

vilinski commented Feb 1, 2020

Oh, seems it's not a false positive! :) Log property vs class property. Thank you for explanation. I will set the rule for my needs using R# for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants