stylecop

MS StyleCop and CruiseControl.NET

I wonder if anybody tried to integrate StyleCop into CruiseControl.NET. Does anybody know something about it? or at least did anybody create and publish an xsl file for displaying StyleCop result onto CCNet's dashboard? EDIT: I found this project, it provies cmd interface for StyleCop, produces result in xml format and also provides xs...

What custom Stylecop rules have you written?

We're going to be integrating StyleCop into our build system in a couple of weeks. Trolling the web gave me some nice ideas for custom rules that could come in handy, such as a rule for filtering for profanity and sorting your members alphabetically (love this one). Have you written any custom rules? What are they? ...

FxCop / StyleCop for Delphi?

Does anyone know of an equivalent to FxCop/StyleCop for Delphi? I would really like to get the automatic checking of style, etc. into Continuous Integration. ...

Can StyleCop automatically fix anything?

I've decided to start running StyleCop on a medium sized project and am getting over 1000 warnings. Is there a quick easy way to fix most of these warnings? Most of the warnings could easily have been automated to resolve and would save me a lot of time. ...

Transfer all ReSharper Settings between PCs

I was wondering if there is a way to copy ALL my settings from ReSharper (including the StyleCop for ReSharper settings and the keyboard bindings I have set for ReSharper) from one PC to another? ...

how to change a stylecop rule

Does anyone know how to change the stylecop rule (sa1600 if it helps) that says that elements must be documented so that it only applies to properties and not to private members? Our ORM (DevExpress XPO) requires that you have private members for all public properties (because you have to call a function in the setter to persist it as w...

Getting StyleCop rule SA1503 CurlyBracketsMustNotBeOmitted to be more flexible

I am having a hard time with StyleCop rule SA1503 (CurlyBracketsMustNotBeOmitted). In my code I quite often have a pattern thus: public void SomeFunction(string someArg) { if (string.IsNullOrEmpty(someArg)) throw new ArgumentNullException("someArg"); // rest of the function here } The rationale behind this is to save vertica...

style cop, advantages/disadvantages

Is stylecop useful, advantages or disadvantages of it? I have also downloaded StyleCop, Resharper StyleCop. I am using resharper and it has its own coding standards and StyleCop has its own, I am confused which rules will be used? ...

Would an open source project have "Copyright. All rights reserved." written on its licensing disclaimer?

I was trying to make some code I wrote be published under LGPL. I included the appropriate header in each file, but StyleCop told me to include a copyright notice also. But I think that "Copyright. All rights reserved." is not intended to free software. Should I remove it? ...

Get Resharper to Consume StyleCop configuration

Our project already has a StyleCop configuration. I am using ReSharper and I would like to be able to have R# use the StyleCop settings. I know that you can use StyleCopForResharper to build the settings in Resharper and export them as a StyleCop configuration, but can you do the reverse and have Resharper consume the existing StyleCop ...

StyleCop formatting

How i format following line without stylecopy warnings: this.BeginInvoke(this.updateHandler,new object[]{this.tmpbuf}); Now i get 4 warnings: - Warning 4 SA1001: Invalid spacing around the comma. - Warning 5 SA1011: Invalid spacing around the closing square bracket. - Warning 6 SA1012: Invalid spacing around the opening curl...

Is sa1200 All using directives must be placed inside the namespace (StyleCop) purely cosmetic?

Possible Duplicate: Should Usings be inside or outside the namespace sa1200 All using directives must be placed inside the namespace (StyleCop) Is this just for code readibility or is there any actual advantage to doing so? Does it help the GC somehow? ...

The field must have a documentation header - Style Cop - Code smell?

I was just running style cop against some of my code and got a few: SA1600: The field must have a documentation header. Now don't get me wrong I like style cop, it's great when you work on a project with more then one person but this rule seems a bit excessive to me. Why would you want to add: /// <summary> /// blah blah bla...

stylecop exclude event handlers from casing

I have just discovered sylecop and am running it through my projects, I have disabled certain rules such as usings must be within the namespace. However visual studio auto generated event handlers for say a button click are in the form btnOk_Click(.... This as I understand it doesn't conform to stylecop default settings as they should ...

StyleCop and = space

I am running StyleCop (which btw I completely recommend if you want to deliver high quality code)... I have this line [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable=false)] update tried this too [System.Xml.Serialization.XmlRootAttribute(Namespace="", IsNullable=false)] StyleCop is reporting an error Warn...

StyleCop integration with CI build process (Criuse Control, Nant, msbuild and StyleCop)

I have been asked to integrate StyleCop in our CI build process in such a way that: Individual project file in our (large) solution are not affected I don't have to use any 3rd party tool The first requirement (and I don't fully understand this yet) is due to the fact that we don't want to run StyleCop on our entire solution straight...

StyleCop specific config / MSBuild & Visual Studio various behaviours

Hi, Here is a problem with specific StyleCop configuration. I've got a total of two Settings.StyleCop files in my Visual Studio .Net solution folders. The first is placed at the folder root with chosen rules for the team. As I want to disable some rules for a specific project, I've put another Settings.StyleCop file in the correspond...

Is there a StyleCop/FxCop autofixing tool?

Is there a tool that can automatically fix StyleCop and FxCop rules, rather than manually fixing thousands of warning and errors? There must be one, it is such a good business opportunity! ...

Hosting StyleCop in a Custom Environment

I want to host StyleCop in a Custom Environment, the sample code provided in SDK uses this foreach(string myProject in this.myProjects). String doesn't have properties like Path.GetHashCode() and FilesToAnalyze, does anyone knows what is this.myProjects? List<CodeProject> projects = new List<CodeProject>(); // what is this.myProjec...

StyleCop and FxCop rules exclude each other

I'm using StyleCop and FxCop tools to improve my code but I came to a place where there are two rules, one in StyleCop and one in FxCop that exclude each other. If I fix my code to match the rule from StyleCop then FxCop validation fails and vice versa. First rule is SA1200 from StyleCop which says that all using directives must be plac...