Heh, I just ran into that second rule last night, since i also write my tests using the underscore notation. I was torn for a second, since I am well trained by ReSharper to follow their advice, but i think i'll just have to live with blue squigglies in my tests. Unless there is a way to disable rules on a per project basis in the same solution
cool. personally still not on the R# boat though because my only experience installing it messed up all my key bindings and i've been cross with it ever since. I'm a keyboard guy; I can't live without my keybindings being right.
In the Naming styles, you can configure it to recognize method names with underscores. There are two options: all_lower and First_upper. As far as I can tell, you can't have it recognize one or the other on a class by class basis but you can tell it to recognize both styles (UpperCamelCase and First_upper) globally.
For suggestions that you don't always like to follow but would still like to know about, you can change the blue squiggly underlines to a smaller, less prominent line that won't be highlighted in the sidebar:
I don't know about earlier versions of Resharper, but with version 4.5, you can have multiple naming convention rules for any given element. For instance, I use both UpperCamelCase (not sure about this rule name) and lower_case conventions for method names to avoid the exact message that you show here, Oren.
> Email-style angle brackets
> are used for blockquotes.
> > And, they can be nested.
> #### Headers in blockquotes
>
> * You can quote a list.
> * Etc.
Horizontal Rules
Three or more dashes or asterisks:
---
* * *
- - - -
Manual Line Breaks
End a line with two or more spaces:
Roses are red,
Violets are blue.
Fenced Code Blocks
Code blocks delimited by 3 or more backticks or tildas:
```
This is a preformatted
code block
```
Header IDs
Set the id of headings with {#<id>} at end of heading line:
## My Heading {#myheading}
Tables
Fruit |Color
---------|----------
Apples |Red
Pears |Green
Bananas |Yellow
Definition Lists
Term 1
: Definition 1
Term 2
: Definition 2
Footnotes
Body text with a footnote [^1]
[^1]: Footnote text here
Abbreviations
MDD <- will have title
*[MDD]: MarkdownDeep
FUTURE POSTS
Partial writes, IO_Uring and safety - about one day from now
Configuration values & Escape hatches - 4 days from now
What happens when a sparse file allocation fails? - 6 days from now
NTFS has an emergency stash of disk space - 8 days from now
Challenge: Giving file system developer ulcer - 11 days from now
And 4 more posts are pending...
There are posts all the way to Feb 17, 2025
RECENT SERIES
Challenge
(77): 20 Jan 2025 - What does this code do?
Answer
(13): 22 Jan 2025 - What does this code do?
Comments
Heh, I just ran into that second rule last night, since i also write my tests using the underscore notation. I was torn for a second, since I am well trained by ReSharper to follow their advice, but i think i'll just have to live with blue squigglies in my tests. Unless there is a way to disable rules on a per project basis in the same solution
cool. personally still not on the R# boat though because my only experience installing it messed up all my key bindings and i've been cross with it ever since. I'm a keyboard guy; I can't live without my keybindings being right.
I suppose I should probably try it again.
In the Naming styles, you can configure it to recognize method names with underscores. There are two options: all_lower and First_upper. As far as I can tell, you can't have it recognize one or the other on a class by class basis but you can tell it to recognize both styles (UpperCamelCase and First_upper) globally.
Yeah I noticed the underscore complaints... you can suppress it with a comment:
// ReSharper disable InconsistentNaming
I put that at the top of my specs which does the trick
For suggestions that you don't always like to follow but would still like to know about, you can change the blue squiggly underlines to a smaller, less prominent line that won't be highlighted in the sidebar:
Resharper->Options->->Inspection Severity
Change "Show as hint"
I don't know about earlier versions of Resharper, but with version 4.5, you can have multiple naming convention rules for any given element. For instance, I use both UpperCamelCase (not sure about this rule name) and lower_case conventions for method names to avoid the exact message that you show here, Oren.
Take the suggestion, take it :)
Comment preview