Tech Off Thread

8 posts

(MsBuild) StyleCop task

Back to Forum: Tech Off
  • User profile image
    erik_

    I am playing around with building msbuild script and found there is a StyleCop task in the Microsoft.Sdc.Tasks.Tools.

    Which as far as google tells me will do for code comments what fxCop does for code.

    But I am unable to find a download for this.
    Is this an internal tool from Microsoft or is the tool renamed?


  • User profile image
    blowdart

    Internal tool.

  • User profile image
    Bo Lund

    Not any more Cool. We released version 4.2 of the tool to the web yesterday.

    Check it out at http://code.msdn.microsoft.com/sourceanalysis.

    Regards
    Bo Lund (Co-developer of Source Analysis a.k.a. StyleCop)

  • User profile image
    blowdart

    Bo Lund wrote:
    

    Not any more . We released version 4.2 of the tool to the web yesterday.

    Check it out at http://code.msdn.microsoft.com/sourceanalysis.

    Regards
    Bo Lund (Co-developer of Source Analysis a.k.a. StyleCop)



    Oh good. A willing victim.

    Now a couple of things

    1) Spaces over tabs? Are you insane? Tongue Out
    2) When will we see an easy way to turn off particular rules?

  • User profile image
    erik_

    It's great that it is availible now, but I find some of the rules a bit weird. They differ from the default behavior of the visual studio templates. For example the:

    SA1200: All using directives must be placed inside of the namespace.

    Is there any documentation availible on the why, just like there is with fxcop?

  • User profile image
    AndyC

    blowdart wrote:
    
    2) When will we see an easy way to turn off particular rules?


    There is a configuration tool in the program's directory, which seems to let you select what rules you want (I didn't look that hard as it was nearly 5 on Friday!)

  • User profile image
    blowdart

    AndyC wrote:
    
    blowdart wrote:
    
    2) When will we see an easy way to turn off particular rules?


    There is a configuration tool in the program's directory, which seems to let you select what rules you want (I didn't look that hard as it was nearly 5 on Friday!)



    Ah, I forgot, "on a per project basis".

    OK that is being very fussy, as it's really a tool for company standard rules; except those us working on multiple projects for multiple companies ...

  • User profile image
    daggmano

    The benefits of tabs vs spaces can be argued either way (and passionately!).  I'm a tabs man, myself.  Still, I'm REALLY interested in the reasons behind SA1200's 'using directives must be placed inside of the namespace' (which isn't heaps good english, anyway), especially when the Microsoft class templates place the using directives OUTSIDE the namespace.  I'm not being critical (well, not negatively, anyway), but I am interested as to why I should change my Microsoft-taught programming habits...  Nice tool, but...

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.