stylecop

Get Resharper to Consume StyleCop configuration

送分小仙女□ 提交于 2019-12-03 08:29:34
问题 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 config? 回答1: I am not sure is this post still actual. There is free StyleCop for ReSharper at CodePlex. It uses StyleCop assembly so it will use project file

Implementing StyleCop MSBUILD From NuGet Package

半腔热情 提交于 2019-12-03 07:32:02
A quick precursor to say that I've done the usual searching around the forums and net in general, and I've tried a multitude of suggestions found on this forum and elsewhere to no avail. The problem I'm having is that my company is looking to implement internal automated peer-reviews (to an extent of course) with the use of tools such as StyleCop, ReSharper and JSLint (etc etc). We're using a custom NuGet package against our internal NuGet Package Repository (feed) so that our developers get an administered release of tools (i.e. they cannot download the latest StyleCop when it comes out until

Interpolate string c# 6.0 and Stylecop

ぃ、小莉子 提交于 2019-12-03 05:43:08
I am using Stylecop version : 4.7.49.0 Has anyone used the latest interpolate string functionality in c# 6.0 example var totalUnits = GetUnitsGetTotalIssuedShares(myId); var testString = $"Test Units :{totalUnits}, have been shipped."; When I build i get the stylecop error SA0102 - because stylecop cant parse the file. It doesn't seem like there is a new version of stylecop that can handle 6.0 yet? error :SA0102: A syntax error has been discovered in file Is there anyway around this error? SA0102 is an internal stylecop error so can't be supressed or ignored via a settings file. You can

StyleCop integration with Visual Studio 2015 RC

我的未来我决定 提交于 2019-12-03 03:08:13
问题 I want to integrate my instance of VS 2015 RC with StyleCop in the way that I have StyleCop menu options [ Run StyleCop , Run StyleCop (Rescan All) , StyleCop Settings ] available when right clicking on project in Solution Explorer. Installing StyleCop-4.7.49.0.msi from official StyleCop site adds proper options for VS 2013 but not for 2015. Is it possible to achieve that? 回答1: If it can help you, I have created a fork of StyleCop from CodePlex. My version works now with VS2015 and support

Disable StyleCop for specific lines

前提是你 提交于 2019-12-03 01:01:24
We're using StyleCop in our C# projects. In some cases we'd like to avoid the rules though. I know you can add // <auto-generated /> in the beginning of the file to make StyleCop ignore it. However, I don't want to ignore the rules for the whole file - only a block of code within it. Can I disable StyleCop for specific lines somehow? You can suppress rules by adding attributes to blocks of code. Here's a simple example on a class from the blog post linked below, but you can do it on various members individually: [SuppressMessage("Microsoft.StyleCop.CSharp.DocumentationRules", "SA1600

Get Resharper to Consume StyleCop configuration

你。 提交于 2019-12-02 22:14:58
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 config? I am not sure is this post still actual. There is free StyleCop for ReSharper at CodePlex. It uses StyleCop assembly so it will use project file settings. I don't know of any way to do this, but it is possible for R# to layout your members/properties

StyleCop integration with Visual Studio 2015 RC

点点圈 提交于 2019-12-02 17:41:24
I want to integrate my instance of VS 2015 RC with StyleCop in the way that I have StyleCop menu options [ Run StyleCop , Run StyleCop (Rescan All) , StyleCop Settings ] available when right clicking on project in Solution Explorer. Installing StyleCop-4.7.49.0.msi from official StyleCop site adds proper options for VS 2013 but not for 2015. Is it possible to achieve that? ptittof57 If it can help you, I have created a fork of StyleCop from CodePlex. My version works now with VS2015 and support most of new C# 6 specifications. Like version 4.7.49.0, you can right click on your project and you

How do I integrate StyleCop 4.7 with Visual Studio 2013?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 17:31:55
I really want to use StyleCop with my Visual Studio 2013, but unfortunately it won't work. I've installed the 4.7 version from the official site , checking all options, both VS Studio integration and MSBuild integration, following the precise instructions (download, install while VS applications are closed, then start VS) but it just won't show up in my Visual Studio 2013. The StyleCop website says that it should be compatible with VS2013. It won't show up anything related to StyleCop under tools and it won't show up the 'Run StyleCop' action when I right-click my C# project. Already tried the

StyleCop/FxCop 10 - How do you properly suppress a message only on a namespace level?

别说谁变了你拦得住时间么 提交于 2019-12-01 16:28:19
FxCop 10 is complaining about the following: using XYZ.Blah; //CA1709 - "XYZ" using Xyz.Blah; //No complaint. using XylophoneSuperDuperLongFullName.Blah; //I don't want to have a long full name for my company name. The problem is... I want my company name to show up in all UPPERCASE because XYZ is an abbreviation. The long version of the name is much too long to be a useful namespace. Microsoft gets away with this kind of stuff because their acronym is only 2 letters. using MS.Something; //No Complaint. using Microsoft.SomethingElse; //No Complaint. So, I was looking at adding a

Temporarily disable StyleCop warnings on ReSharper 6

懵懂的女人 提交于 2019-12-01 16:03:12
I downloaded StyleCop 4.6.3 which integrates with ReSharper 6 and the results are really fantastic! However on a specific project I would like to disable the StyleCop warnings (temporarily) and enable again later on. Is there any way of doing this? I can't seem to find it on the ReSharper menu (options, etc). You can use different Settings.Stylecop settings for each project, just create one that ignores all the rules. Right click on a project and select Stylecop settings to modify them. I think you can also disable plugins by unticking them from ReSharper->Plugins... (in version 5.1, not sure