Local variables in switch-case statements needing prefixes

I am having to suppress the StyleCop PrefixCallsCorrectly message (1126) on methods with local variables created in switch cases. An example: private void LocalMethod(int caseVar) { switch(caseVa...

Id #7676 | Release: None | Updated: Today at 9:06 AM by ouflak | Created: Today at 9:06 AM by ouflak

StyleCop not checking all files in project

(Sorry, accidentally posted this under issues - please delete as I've now posted it under discussions) I've noticed that StyleCop doesn't seem to be checking every file in my project. I know for ...

Id #7675 | Release: None | Updated: Sep 23 at 8:39 AM by andyste1 | Created: Sep 23 at 8:35 AM by andyste1

Some kinds of alphabetical namespaces will violate SA1210 rule

Some alphabetical namespaces such as using My.Project.ObjectModel; using My.Project.ObjectModelExtensions; Will violate SA1210: UsingDirectivesMustBeOrderedAlphabeticallyByNamespace. This only h...

Id #7674 | Release: None | Updated: Sep 23 at 1:49 AM by sqybi | Created: Sep 22 at 2:35 AM by sqybi

SA1642: Error message is incorrect for generic classes

When verifying documentation of constructors for generic classes, the error message is incorrect. Steps to replicate error: /// <summary> /// This is only a test. /// </summary> /// <typeparam n...

Id #7673 | Release: None | Updated: Sep 19 at 6:36 PM by amullins | Created: Sep 19 at 6:36 PM by amullins

StyleCop parser unusable if code contains C# 6.0 features

Most C# 6.0 features introduce new syntax. There's likely a few additions which won't trip up the StyleCop compiler. But at least auto-property initializers (public int X { get; set; } = x;), dec...

Id #7672 | Release: None | Updated: Sep 22 at 1:33 PM by bytenik | Created: Aug 28 at 5:52 AM by dougbu

[dev] VSPackageUnitTest test runs are flakey

The VSPackageUnitTest source code still uses private accessors in a number of places. That feature was deprecated when VS 2010 was released and hasn't seen much love since. Moving to [InternalsVi...

Id #7671 | Release: None | Updated: Aug 27 at 9:04 PM by dougbu | Created: Aug 27 at 9:04 PM by dougbu

[dev] VerifyBuild.cmd fails if VS 2012 is not installed

Current build configuration seems to require both VS 2010 and 2012. Part of the problem is binaries in the default %MSTESTPATH% folder require v11.0 versions of additional Visual Studio binaries. ...

Id #7670 | Release: None | Updated: Aug 27 at 8:59 PM by dougbu | Created: Aug 27 at 8:59 PM by dougbu

[dev] VSPackageUnitTest project is incompatible with VS 2010

This project is configured to require .NET 4.5 though it has no actual dependencies on that version of the platform. Simple fix is to change the <TargetFrameworkVersion> in the properties file. ...

Id #7669 | Release: None | Updated: Aug 27 at 9:01 PM by dougbu | Created: Aug 27 at 7:22 PM by dougbu

[dev] VerifyBuild.cmd fails unless ReSharper 8.2 is installed

Builds fail when ReSharper is not available on a machine. The error relates to an unknown configuration. This is either a problem with VerifyBuild.cmd itself or a missing item on the Set up your ...

Id #7668 | Release: None | Updated: Aug 27 at 7:22 PM by dougbu | Created: Aug 27 at 7:15 PM by dougbu

ArgumentOutOfRangeException when using "var _" in a foreach loop.

I keep running into an ArgumentOutOfRangeException when stylecop tries to parse a file that has a var name set to _ in a foreach loop. I am using StyleCop.Msbuild version 4.7.49.0. eg. foreach (...

Id #7667 | Release: None | Updated: Aug 20 at 7:37 PM by KnightFox | Created: Aug 19 at 7:42 PM by KnightFox