stylecop

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

纵饮孤独 提交于 2019-12-18 04:31:30
问题 This question already has answers here : Closed 10 years ago . 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? 回答1: It definitely won't help with GC. Here's the discussion about two styles: http://blogs.msdn.com/abhinaba/archive/2006/08/21/709051.aspx http://blogs.msdn.com/abhinaba/archive

StyleCop equivalent for SQL Server?

﹥>﹥吖頭↗ 提交于 2019-12-14 04:25:54
问题 Is there any tools like StyleCop for SQL Server? We need the same features of StyleCop (enforce a set of style and consistency rules). [Additional Feature]: Integration with SQLServer Management Studio would be cool. 回答1: There is SSW's SQLAuditor [There's also the SQL Server 2008 R2 Best Practices Analyzer but that has more of a DBA focus] 来源: https://stackoverflow.com/questions/3202887/stylecop-equivalent-for-sql-server

How to use the StyleCop Plugin with the Resharper command line or “InspectCode” tool

跟風遠走 提交于 2019-12-13 18:28:39
问题 We use Resharper with the StyleCop plugin. It works great inside Visual Studio without any problems. Now I'd like to get statistics about our projects. I am building all our solutions from the command line and so far managed to get the output from the compiler (warnings) static code analysis (ex FxCop) and unit testing (results and coverage). JetBrains offers a commandline tool that does code analysis for free (Link). I'm using it and it works as expected. The command line version does not

Using this keyword in c# Visual studio vs Stylecop [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-13 07:08:34
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I am working on a windows service C# project and I am working first time in C#. An I am getting 2 different suggestion from VS as well Stylecop for a same this keyword. (I know, this keyword refers to the current instance of the class) So I removed this keyword, and I am

StyleCop from C# wrapper not detecting violations

ぃ、小莉子 提交于 2019-12-13 03:56:32
问题 I'm using this GitHub repo to try and run StyleCop from CMD. I downloaded the GitHub repo and built it on my local machine using VS2017. I tried to run the batch script This is what I've done so far: Downloaded as ZIP and extracted into a folder. Opened the solution in VS2017 and built it (no errors). I then tried to run 'sample.bat' (..\source\StyleCopCmdLine\bin\Debug\sample.bat) , which does the following (and was created by the owners of the source to test the repo): Load source file ..

Issue with Global.asax.cs file and StyleCop rule SA1649

試著忘記壹切 提交于 2019-12-12 20:27:41
问题 Currently I'm working on a project at work and we're looking at upgrading our StyleCop from version 4.3.3 to 4.5 During the fun of all that, we've come across rule SA1649 - "FileHeaderFileNameDocumentationMustMatchTypeName" which is all nice and that, but causes issues with Global.asax.cs files, in that the file // -------------------------------------------------------------------------------------------------------------------- // <copyright file="Global.asax.cs" company="COMPANY"> //

How to disable rule SP1516 in Settings.StyleCop?

若如初见. 提交于 2019-12-11 09:43:12
问题 I want to disable this style cop rule SP1516: Adjacent elements must be separated by a blank line. How do I do that? What do I write in Settings.StyleCop ? 回答1: The following blog entry by Microsoft StyleCop gives you instructions on how to disable individual rules - Enabling or Disabling StyleCop Rules Right Click Project -> Source Analysis Settings Click on the 'Rules' tab Navigate to the particular rule you want to disable and uncheck it. Click OK! 回答2: You can disable it in Settings

Stylecop: Source Control the CustomDictionary.xml dictionary?

情到浓时终转凉″ 提交于 2019-12-11 04:55:16
问题 I want to place a customdictionary.xml file inside my solution directory and have it source controlled so other developers can also take advantage of this. According to this StyleCop link I have to place it next to the stylecop.dll which is under program files. It also talks about Settings.StyleCop file, which I don't seem to have. Is this per project or per solution ? The file also talks about a custom.dic, is this different to the customdictionary.xml file? 回答1: If you open the StyleCop

Should a local const variable start with Upper or lower casing

我与影子孤独终老i 提交于 2019-12-10 20:58:43
问题 Got a style conflict between StyleCop and Resharper. Stylecop 1303 says that const vars should start uppercase and I agree. Resharper says OK for class-wide const declarations, but when using a const in a local (e.g. method) scope, Reshaper doesn't approve and wants to make everything camelCasing. Of course no problem to disable this rule in R#, but what could be the reason behind this rule? Anyone any thoughts? 回答1: If you download Stylecop for Resharper then it comes with a Resharper

Need a C# Assembly to reference a strongly named assembly loosely

China☆狼群 提交于 2019-12-10 15:22:56
问题 So here's the problem. I'm writing some StyleCop plug-in assemblies for use at the company I work for. As such, these assemblies need to reference Microsoft.StyleCop.CSharp.dll for example, which is strongly named. The problem comes in that if I build this and pass it along to the developers in my group, they must have the same version of the StyleCop dll (currently 4.3.3.0) or it fails to load. What is the best way to make my add-on rules DLL more independent? Should I just install my 4.3.3