This Question is Not Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
4 Replies Last post: Jun 25, 2012 4:37 PM by Gene Steinbacher  
Gene Steinbacher Newbie 3 posts since
Jun 22, 2012
Currently Being Moderated

Jun 22, 2012 7:03 PM

Local variable is never used showing as an error instead of warning

During the inspection of code refactoring I get the "Local variable 'x' is never used".  In Resharper version 5.x it would show up as a warning but in version 6.x it is showing up as an error.  But my code compiles so I know it is not a warning.  How can I change this back to the behavior in 5.x so I see the unused variables as warnings?

Klaus Luedenscheidt Apprentice 660 posts since
May 28, 2004
Currently Being Moderated
Jun 23, 2012 8:33 AM in response to: Gene Steinbacher
Re: Local variable is never used showing as an error instead of warning

you can modify the severity of R# messages in the options. See "Code Inspection / Inspection severity".

 

Regards

Klaus

Klaus Luedenscheidt Apprentice 660 posts since
May 28, 2004
Currently Being Moderated
Jun 24, 2012 7:51 AM in response to: Gene Steinbacher
Re: Local variable is never used showing as an error instead of warning

did you select "All" in "treat warnings as errors" in the build settings of your project?

 

2012-06-24_05h50_02.png

This overrides R# setting

 

Regards

Klaus

More Like This

  • Retrieving data ...