Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReSharper Code Cleanup/Reformat Code feature vs Versioning Control Systems

ReSharper Code cleanup feature (with "reorder members" and "reformat code" enabled) is really great. You define a layout template using XML, then a simple key combination reorganizes your whole source file (or folder/project/solution) according to the rules you set in the template.

Anyway, do you think that could be a problem regarding VCS like subversion, cvs, git, etc. ? Is there a chance that it causes many undesired conflicts ?

Thank you.

like image 546
Romain Verdier Avatar asked Sep 11 '08 11:09

Romain Verdier


1 Answers

Yes, it will definitely cause problems. In addition to creating conflicts that have to be manually resolved, when you check in a file that has been reformatted, the VCS will note almost every line as having been changed. This will make it hard for you or a teammate to look back at the history and see what changed when.

That said, if everyone autoformats their code the same way (ie, you distribute that XML template to the team), then it might work well. The problems really only come in when not everyone is doing the same thing.

like image 178
pkaeding Avatar answered Nov 10 '22 20:11

pkaeding