Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically accept all warnings/suggestions changes with resharper

Tags:

resharper

I am very new to Resharper and trying to implement all the suggestion it gives. Can I do it automatically? I have tried code cleanup. but that wont do all of them. Also I need to remove all commented code. How can I do it? Also I am running it with a silverlight application. Is there any chance of breaking something if I auto accept the suggestions?

like image 389
Tanmoy Avatar asked Sep 12 '09 16:09

Tanmoy


2 Answers

It may be more work, but you should apply any cleanup operation "manually" so that you know what has been changed in your code, can learn from those changes, and can be sure that all the changes are correct. Code Analysis tools offer you suggestions, but they are never 100% correct - sometimes you need to do a bit of the programming yourself ;-)

Don't think of it as a chore. Think of it as a (tedious and repetitive) way of learning a better coding style. THe more often you accept a specific change, the more strongly you will remember the "better" way to write similar code the next time.

like image 65
Jason Williams Avatar answered Oct 19 '22 02:10

Jason Williams


Yes, you can do it by code cleanup.

like image 26
Anton Avatar answered Oct 19 '22 01:10

Anton