Wednesday, October 1, 2008

StyleCop

Well, I may not like StyleCop, but my company is definitely moving in that direction. So Ole and I are working with StyleCop this week.

I am pretty amazed that Resharper can be configured to support 99% of StyleCop without requiring plugins or patches. That says something about the flexibility of Resharper.

There are 2 issues that we cannot get to work:

1) Inserting the required File Header comment at the top of the file. If you set up a File Header in Resharper and run Reformat Code, it will simply overwrites the file header each time. The work-around is to have a Live Template to insert the File Header and not have Resharper update it when reformatting code.

2) Blank line between get and set accessors in a property. You have to do this manually. To me this is just a stupid rule in StyleCop, but I have to live with it.

I'll post our Code Style and Type Member Layout as soon as it is done.

No comments: