Click here to Skip to main content
15,902,112 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: StyleCop Pin
Wastedtalent10-Mar-15 2:42
professionalWastedtalent10-Mar-15 2:42 
AnswerRe: StyleCop Pin
CDP180210-Mar-15 0:10
CDP180210-Mar-15 0:10 
GeneralRe: StyleCop Pin
yippiecoder10-Mar-15 10:40
yippiecoder10-Mar-15 10:40 
AnswerRe: StyleCop Pin
manchanx10-Mar-15 1:12
professionalmanchanx10-Mar-15 1:12 
AnswerRe: StyleCop Pin
Eddy Vluggen10-Mar-15 1:24
professionalEddy Vluggen10-Mar-15 1:24 
GeneralRe: StyleCop Pin
Super Lloyd10-Mar-15 6:01
Super Lloyd10-Mar-15 6:01 
AnswerRe: StyleCop Pin
Slacker00710-Mar-15 4:42
professionalSlacker00710-Mar-15 4:42 
AnswerRe: StyleCop Pin
yippiecoder10-Mar-15 10:33
yippiecoder10-Mar-15 10:33 
XML
Hmm, Super Lloyd I think you nailed it on the head in that you don’t want to be bothered with style issues so StyleCop may be seen as just an impediment. Nothing wrong with that. StyleCop certainly takes a lot of getting used to and if the benefits of its use won’t be realized, well, just like anything else, probably best not to go down that path.

We started using StyleCop 5 years ago in one project and moved to use it in all of our in-development C# projects, ~70. Prior to its usage, styles varied wildly and conflicted making for a difficult to read, modify and navigate code base. We've gone from a team of 5 developers up to 12 and now to 4.

A few notes:
1.  It is not that StyleCop rules are always right, it’s the fact that they are always enforced that, IMHO, is the big win. Ever have to listen to, or explain about style in a code review? Tool usage might be easier. – megaadam mentioned this as well.
2.  Enforcing that StyleCop warnings are errors or turn them all the way off to avoid spewing warnings that never get fixed.
3.  Understand that it takes quite a while to get used to the level of checking. It took me about 6 months but around then I just stopped doing things that would cause errors, same thing goes with Code Analysis.
4.  Some team members had to give up the idea that their code style was part of who they were or how they expressed themselves. Once they got over that, they were the biggest proponents of the tool.
5.  The <inheritdoc/> tag can be used when implementing overrides where the base class documentation is sufficient to avoid duplication.
6.  The <include file='....'/> tag can be used for documentation that would otherwise have been copied and pasted.
7.  A CustomDictionary.xml can be used to inform StyleCop of naming overrides.
8.  The argument that things should be placed next other things which are most related works great until it doesn’t. For example, two methods or properties that use the same field – where should the field be located?
9.  I don’t know what you are referring to when talking about #regions begin required around using statements. #region’s and StyleCop don’t get along together well and most of our code base does not use #region’s. The only requirement I know of is the ordering and placement of namespace using statements; they must be within the enclosing namespace and grouped and order by name.

GeneralRe: StyleCop Pin
Super Lloyd10-Mar-15 17:52
Super Lloyd10-Mar-15 17:52 
AnswerRe: StyleCop Pin
Brady Kelly10-Mar-15 21:31
Brady Kelly10-Mar-15 21:31 
GeneralRe: StyleCop Pin
Super Lloyd11-Mar-15 14:53
Super Lloyd11-Mar-15 14:53 
GeneralRe: StyleCop Pin
Brady Kelly11-Mar-15 17:38
Brady Kelly11-Mar-15 17:38 
AnswerRe: StyleCop Pin
Kent Bolton11-Mar-15 0:59
Kent Bolton11-Mar-15 0:59 
GeneralRe: StyleCop Pin
Super Lloyd11-Mar-15 2:51
Super Lloyd11-Mar-15 2:51 
GeneralRe: StyleCop Pin
Brady Kelly11-Mar-15 18:15
Brady Kelly11-Mar-15 18:15 
AnswerRe: StyleCop Pin
Kent Bolton11-Mar-15 1:16
Kent Bolton11-Mar-15 1:16 
AnswerRe: StyleCop Pin
Member 1151684211-Mar-15 7:21
Member 1151684211-Mar-15 7:21 
GeneralRe: StyleCop Pin
Super Lloyd11-Mar-15 14:30
Super Lloyd11-Mar-15 14:30 
AnswerRe: StyleCop Pin
Member 1055573511-Mar-15 12:15
Member 1055573511-Mar-15 12:15 
GeneralWhen 932* years you reach, look this good, you will not! Pin
Nagy Vilmos9-Mar-15 22:56
professionalNagy Vilmos9-Mar-15 22:56 
GeneralRe: When 932* years you reach, look this good, you will not! Pin
Slacker0079-Mar-15 23:08
professionalSlacker0079-Mar-15 23:08 
GeneralRe: When 932* years you reach, look this good, you will not! Pin
CDP18029-Mar-15 23:12
CDP18029-Mar-15 23:12 
GeneralRe: When 932* years you reach, look this good, you will not! Pin
Agent__0079-Mar-15 23:16
professionalAgent__0079-Mar-15 23:16 
GeneralRe: When 932* years you reach, look this good, you will not! Pin
CDP18029-Mar-15 23:57
CDP18029-Mar-15 23:57 
GeneralRe: When 932* years you reach, look this good, you will not! Pin
manchanx10-Mar-15 0:15
professionalmanchanx10-Mar-15 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.