Help with rule IDE1006 "Naming rule violation: Missing prefix: '____RULE_VIOLATION____'" #37
Unanswered
GerryWilko
asked this question in
Q&A
Replies: 2 comments
-
I read through the rules again and I've sussed it. This rather unhelpful message is telling me that I cannot have non-private instance fields. Make sense, you should always use C# properties for this. Hope this helps someone else out. Took me a while to decipher.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Glad you sorted it. Unfortunately |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have recently added your .editorconfig file to our project. Thank you for taking the time to produce this, its fantastic and encourages best practices.
I am having a rather strange issue however. Rule IDE1006 is attempting to prefix and suffix all my uses of protected variables throughout my codebase. Strangely a google of this exact error message reveals nothing which would suggest no one else has experienced this issue.
The lines in question do conform to the .editorconfig rules. For example:
But they produce the Error IDE1006 "Naming rule violation: Missing prefix: 'RULE_VIOLATION'"
Applying the autofix for it produces the following line:
This is obviously wrong but I cant see what I am doing wrong here. Does anybody have any ideas?
Many thanks,
Gerard
Beta Was this translation helpful? Give feedback.
All reactions