diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/StyleCop.Analyzers.CodeFixes.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/StyleCop.Analyzers.CodeFixes.csproj index 98fd499ae..d45383926 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/StyleCop.Analyzers.CodeFixes.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers.CodeFixes/StyleCop.Analyzers.CodeFixes.csproj @@ -2,7 +2,9 @@ - netstandard1.1;net452 + netstandard1.1 + true + portable-net45+win8 StyleCop.Analyzers true true @@ -16,14 +18,6 @@ $(NoWarn),NU5105 - - - - portable-net45+win8 - - - - ..\StyleCop.Analyzers.ruleset diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonArrayTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonArrayTests.cs index 644822d8a..d4d310f6a 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonArrayTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonArrayTests.cs @@ -6,6 +6,8 @@ namespace StyleCop.Analyzers.Test.LightJson { using System; + using System.Diagnostics; + using System.Reflection; using global::LightJson; using Xunit; using IEnumerable = System.Collections.IEnumerable; @@ -141,5 +143,22 @@ public void TestEnumerators() } } } + + [Fact] + public void TestDebugView() + { + var obj = new JsonArray("a", "b", "c"); + var proxyAttribute = obj.GetType().GetCustomAttribute(); + Assert.NotNull(proxyAttribute); + + var proxyType = Type.GetType(proxyAttribute.ProxyTypeName); + Assert.NotNull(proxyType); + + var proxy = Activator.CreateInstance(proxyType, obj); + Assert.NotNull(proxy); + + var items = proxyType.GetTypeInfo().GetDeclaredProperty("Items").GetValue(proxy); + Assert.IsType(items); + } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonObjectTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonObjectTests.cs index 06a973507..9652daec1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonObjectTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonObjectTests.cs @@ -7,6 +7,8 @@ namespace StyleCop.Analyzers.Test.LightJson { using System; using System.Collections.Generic; + using System.Diagnostics; + using System.Reflection; using global::LightJson; using Xunit; using IEnumerable = System.Collections.IEnumerable; @@ -109,6 +111,35 @@ public void TestRename() Assert.Same(value, obj["y"].AsString); } + [Fact] + public void TestDebugView() + { + var obj = new JsonObject + { + ["x"] = "string value", + ["y"] = new JsonObject(), + ["z"] = new JsonArray("a", "b", "c"), + }; + var proxyAttribute = obj.GetType().GetCustomAttribute(); + Assert.NotNull(proxyAttribute); + + var proxyType = Type.GetType(proxyAttribute.ProxyTypeName); + Assert.NotNull(proxyType); + + var proxy = Activator.CreateInstance(proxyType, obj); + Assert.NotNull(proxy); + + var keys = proxyType.GetTypeInfo().GetDeclaredProperty("Keys").GetValue(proxy); + var keysArray = Assert.IsAssignableFrom(keys); + + Assert.NotEmpty(keysArray); + foreach (var key in keysArray) + { + var view = key.GetType().GetTypeInfo().GetDeclaredProperty("View").GetValue(key); + Assert.NotNull(view); + } + } + #pragma warning disable IDE0060 // Remove unused parameter private static Type StaticType(T value) => typeof(T); #pragma warning restore IDE0060 // Remove unused parameter diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonValueTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonValueTests.cs index ae2078056..c09efd3cc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonValueTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/LightJson/JsonValueTests.cs @@ -6,6 +6,8 @@ namespace StyleCop.Analyzers.Test.LightJson { using System; + using System.Diagnostics; + using System.Reflection; using global::LightJson; using global::LightJson.Serialization; using StyleCop.Analyzers.Test.Helpers; @@ -351,5 +353,86 @@ public void TestParse() Assert.ThrowsAny(() => JsonValue.Parse(string.Empty)); Assert.ThrowsAny(() => JsonValue.Parse("{")); } + + [Fact] + public void TestDebugViewOfObject() + { + var obj = JsonValue.Parse("{}"); + var proxyAttribute = obj.GetType().GetCustomAttribute(); + Assert.NotNull(proxyAttribute); + + var proxyType = Type.GetType(proxyAttribute.ProxyTypeName); + Assert.NotNull(proxyType); + + var proxy = Activator.CreateInstance(proxyType, obj); + Assert.NotNull(proxy); + + var objectView = proxyType.GetTypeInfo().GetDeclaredProperty("ObjectView").GetValue(proxy); + var arrayView = proxyType.GetTypeInfo().GetDeclaredProperty("ArrayView").GetValue(proxy); + var jsonValueType = proxyType.GetTypeInfo().GetDeclaredProperty("Type").GetValue(proxy); + var value = proxyType.GetTypeInfo().GetDeclaredProperty("Value").GetValue(proxy); + + Assert.Same(obj.AsJsonObject, objectView); + Assert.Same(obj.AsJsonArray, arrayView); + + Assert.IsType(objectView); + Assert.Null(arrayView); + Assert.Equal(obj.Type, jsonValueType); + Assert.Same(obj.AsJsonObject, value); + } + + [Fact] + public void TestDebugViewOfArray() + { + var obj = JsonValue.Parse("[]"); + var proxyAttribute = obj.GetType().GetCustomAttribute(); + Assert.NotNull(proxyAttribute); + + var proxyType = Type.GetType(proxyAttribute.ProxyTypeName); + Assert.NotNull(proxyType); + + var proxy = Activator.CreateInstance(proxyType, obj); + Assert.NotNull(proxy); + + var objectView = proxyType.GetTypeInfo().GetDeclaredProperty("ObjectView").GetValue(proxy); + var arrayView = proxyType.GetTypeInfo().GetDeclaredProperty("ArrayView").GetValue(proxy); + var jsonValueType = proxyType.GetTypeInfo().GetDeclaredProperty("Type").GetValue(proxy); + var value = proxyType.GetTypeInfo().GetDeclaredProperty("Value").GetValue(proxy); + + Assert.Same(obj.AsJsonObject, objectView); + Assert.Same(obj.AsJsonArray, arrayView); + + Assert.Null(objectView); + Assert.IsType(arrayView); + Assert.Equal(obj.Type, jsonValueType); + Assert.Same(obj.AsJsonArray, value); + } + + [Fact] + public void TestDebugViewOfBoolean() + { + var obj = JsonValue.Parse("true"); + var proxyAttribute = obj.GetType().GetCustomAttribute(); + Assert.NotNull(proxyAttribute); + + var proxyType = Type.GetType(proxyAttribute.ProxyTypeName); + Assert.NotNull(proxyType); + + var proxy = Activator.CreateInstance(proxyType, obj); + Assert.NotNull(proxy); + + var objectView = proxyType.GetTypeInfo().GetDeclaredProperty("ObjectView").GetValue(proxy); + var arrayView = proxyType.GetTypeInfo().GetDeclaredProperty("ArrayView").GetValue(proxy); + var jsonValueType = proxyType.GetTypeInfo().GetDeclaredProperty("Type").GetValue(proxy); + var value = proxyType.GetTypeInfo().GetDeclaredProperty("Value").GetValue(proxy); + + Assert.Same(obj.AsJsonObject, objectView); + Assert.Same(obj.AsJsonArray, arrayView); + + Assert.Null(objectView); + Assert.Null(arrayView); + Assert.Equal(obj.Type, jsonValueType); + Assert.Equal(obj, value); + } } } diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/Properties/launchSettings.json b/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/Properties/launchSettings.json deleted file mode 100644 index b66e3605c..000000000 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Visual Studio Extension": { - "executablePath": "$(DevEnvDir)devenv.exe", - "commandLineArgs": "/rootsuffix $(VSSDKTargetPlatformRegRootSuffix) /log" - } - } -} \ No newline at end of file diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/StyleCop.Analyzers.Vsix.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/StyleCop.Analyzers.Vsix.csproj deleted file mode 100644 index 186d283c2..000000000 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/StyleCop.Analyzers.Vsix.csproj +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - net452 - StyleCop.Analyzers - StyleCop.Analyzers.Vsix - - - - false - false - false - false - false - false - Roslyn - - - - - False - - - - ..\StyleCop.Analyzers.Internal.ruleset - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/source.extension.vsixmanifest b/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/source.extension.vsixmanifest deleted file mode 100644 index dd6f8fb3f..000000000 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Vsix/source.extension.vsixmanifest +++ /dev/null @@ -1,21 +0,0 @@ - - - - - StyleCop Analyzers - An implementation of StyleCop's rules using Roslyn analyzers and code fixes - - - - - - - - - - - - - - - diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/AnalyzerConstants.cs b/StyleCop.Analyzers/StyleCop.Analyzers/AnalyzerConstants.cs index ea1cdd6b8..6a03e7f25 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/AnalyzerConstants.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/AnalyzerConstants.cs @@ -1,8 +1,6 @@ // Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. -#nullable disable - namespace StyleCop.Analyzers { using System.Diagnostics.CodeAnalysis; @@ -10,30 +8,6 @@ namespace StyleCop.Analyzers internal static class AnalyzerConstants { - static AnalyzerConstants() - { -#if DEBUG - // In DEBUG builds, the tests are enabled to simplify development and testing. - DisabledNoTests = true; -#else - DisabledNoTests = false; -#endif - } - - /// - /// Gets a reference value which can be passed to - /// - /// to disable a diagnostic which is currently untested. - /// - /// - /// A reference value which can be passed to - /// - /// to disable a diagnostic which is currently untested. - /// - [ExcludeFromCodeCoverage] - [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1623:Property summary documentation should match accessors.", Justification = "This property behaves more like an opaque value than a Boolean.")] - internal static bool DisabledNoTests { get; } - /// /// Gets a reference value which can be passed to /// diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1603DocumentationMustContainValidXml.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1603DocumentationMustContainValidXml.cs index 042eb0d74..ce392c560 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1603DocumentationMustContainValidXml.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1603DocumentationMustContainValidXml.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -43,7 +42,6 @@ internal class SA1603DocumentationMustContainValidXml : DiagnosticAnalyzer ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1628DocumentationTextMustBeginWithACapitalLetter.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1628DocumentationTextMustBeginWithACapitalLetter.cs index e9407379c..17b49cacc 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1628DocumentationTextMustBeginWithACapitalLetter.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1628DocumentationTextMustBeginWithACapitalLetter.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -59,7 +58,6 @@ internal class SA1628DocumentationTextMustBeginWithACapitalLetter : DiagnosticAn ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1630DocumentationTextMustContainWhitespace.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1630DocumentationTextMustContainWhitespace.cs index 9b89035c0..7297caa7c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1630DocumentationTextMustContainWhitespace.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1630DocumentationTextMustContainWhitespace.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -59,7 +58,6 @@ internal class SA1630DocumentationTextMustContainWhitespace : DiagnosticAnalyzer ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1631DocumentationMustMeetCharacterPercentage.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1631DocumentationMustMeetCharacterPercentage.cs index 961bef910..ad8faba8e 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1631DocumentationMustMeetCharacterPercentage.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1631DocumentationMustMeetCharacterPercentage.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -60,7 +59,6 @@ internal class SA1631DocumentationMustMeetCharacterPercentage : DiagnosticAnalyz ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1632DocumentationTextMustMeetMinimumCharacterLength.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1632DocumentationTextMustMeetMinimumCharacterLength.cs index 4a9a0cced..ab617c4c9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1632DocumentationTextMustMeetMinimumCharacterLength.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1632DocumentationTextMustMeetMinimumCharacterLength.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -58,7 +57,6 @@ internal class SA1632DocumentationTextMustMeetMinimumCharacterLength : Diagnosti ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1645IncludedDocumentationFileDoesNotExist.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1645IncludedDocumentationFileDoesNotExist.cs index e8cb6c66c..442e2e8b1 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1645IncludedDocumentationFileDoesNotExist.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1645IncludedDocumentationFileDoesNotExist.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -55,7 +54,6 @@ internal class SA1645IncludedDocumentationFileDoesNotExist : DiagnosticAnalyzer ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs index 0605fc7e5..7602a8f85 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -56,7 +55,6 @@ internal class SA1646IncludedDocumentationXPathDoesNotExist : DiagnosticAnalyzer ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1647IncludeNodeDoesNotContainValidFileAndPath.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1647IncludeNodeDoesNotContainValidFileAndPath.cs index dd22c90ad..8937d0de0 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1647IncludeNodeDoesNotContainValidFileAndPath.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1647IncludeNodeDoesNotContainValidFileAndPath.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -57,7 +56,6 @@ internal class SA1647IncludeNodeDoesNotContainValidFileAndPath : DiagnosticAnaly ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1650ElementDocumentationMustBeSpelledCorrectly.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1650ElementDocumentationMustBeSpelledCorrectly.cs index e2c66405e..2f8286f06 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1650ElementDocumentationMustBeSpelledCorrectly.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1650ElementDocumentationMustBeSpelledCorrectly.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.DocumentationRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -82,7 +81,6 @@ internal class SA1650ElementDocumentationMustBeSpelledCorrectly : DiagnosticAnal ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/ExcludeFromCodeCoverageAttribute.cs b/StyleCop.Analyzers/StyleCop.Analyzers/ExcludeFromCodeCoverageAttribute.cs deleted file mode 100644 index 72d7172cb..000000000 --- a/StyleCop.Analyzers/StyleCop.Analyzers/ExcludeFromCodeCoverageAttribute.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved. -// Licensed under the MIT License. See LICENSE in the project root for license information. - -#nullable disable - -#if NETSTANDARD1_1 - -namespace System.Diagnostics.CodeAnalysis -{ - [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)] - internal sealed class ExcludeFromCodeCoverageAttribute : Attribute - { - } -} - -#endif diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonArray.cs b/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonArray.cs index bd8965164..a81f00a56 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonArray.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonArray.cs @@ -166,7 +166,6 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() return this.GetEnumerator(); } - [ExcludeFromCodeCoverage] private class JsonArrayDebugView { private readonly JsonArray jsonArray; diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonObject.cs b/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonObject.cs index 3bd026c83..49e8b9b54 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonObject.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonObject.cs @@ -188,7 +188,6 @@ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() return this.GetEnumerator(); } - [ExcludeFromCodeCoverage] private class JsonObjectDebugView { private readonly JsonObject jsonObject; diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonValue.cs b/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonValue.cs index abfeac41f..842515c3c 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonValue.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/LightJson/JsonValue.cs @@ -846,7 +846,6 @@ public override int GetHashCode() } } - [ExcludeFromCodeCoverage] private class JsonValueDebugView { private readonly JsonValue jsonValue; diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/MaintainabilityRules/SA1409RemoveUnnecessaryCode.cs b/StyleCop.Analyzers/StyleCop.Analyzers/MaintainabilityRules/SA1409RemoveUnnecessaryCode.cs index d9859433e..d13db10c9 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/MaintainabilityRules/SA1409RemoveUnnecessaryCode.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/MaintainabilityRules/SA1409RemoveUnnecessaryCode.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.MaintainabilityRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -76,7 +75,6 @@ internal class SA1409RemoveUnnecessaryCode : DiagnosticAnalyzer ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/NamingRules/SA1301ElementMustBeginWithLowerCaseLetter.cs b/StyleCop.Analyzers/StyleCop.Analyzers/NamingRules/SA1301ElementMustBeginWithLowerCaseLetter.cs index 8ef79c763..01c295617 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/NamingRules/SA1301ElementMustBeginWithLowerCaseLetter.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/NamingRules/SA1301ElementMustBeginWithLowerCaseLetter.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.NamingRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -37,7 +36,6 @@ internal class SA1301ElementMustBeginWithLowerCaseLetter : DiagnosticAnalyzer ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] public override void Initialize(AnalysisContext context) { context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1109BlockStatementsMustNotContainEmbeddedRegions.cs b/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1109BlockStatementsMustNotContainEmbeddedRegions.cs index f41d836f3..e8b20427b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1109BlockStatementsMustNotContainEmbeddedRegions.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1109BlockStatementsMustNotContainEmbeddedRegions.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.ReadabilityRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -52,7 +51,6 @@ internal class SA1109BlockStatementsMustNotContainEmbeddedRegions : DiagnosticAn ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1126PrefixCallsCorrectly.cs b/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1126PrefixCallsCorrectly.cs index 6121a1ab4..3c3717477 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1126PrefixCallsCorrectly.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1126PrefixCallsCorrectly.cs @@ -6,7 +6,6 @@ namespace StyleCop.Analyzers.ReadabilityRules { using System.Collections.Immutable; - using System.Diagnostics.CodeAnalysis; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.Diagnostics; @@ -46,7 +45,6 @@ internal class SA1126PrefixCallsCorrectly : DiagnosticAnalyzer ImmutableArray.Create(Descriptor); /// - [ExcludeFromCodeCoverage] #pragma warning disable RS1025 // Configure generated code analysis #pragma warning disable RS1026 // Enable concurrent execution public override void Initialize(AnalysisContext context) diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.csproj b/StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.csproj index 1b7e93789..5ee6e049b 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.csproj +++ b/StyleCop.Analyzers/StyleCop.Analyzers/StyleCop.Analyzers.csproj @@ -2,18 +2,12 @@ - netstandard1.1;net452 + netstandard1.1 + true + portable-net45+win8 StyleCop.Analyzers.NewIdRequiredDueToNuGetBug - - - - portable-net45+win8 - - - - ..\StyleCop.Analyzers.ruleset diff --git a/StyleCopAnalyzers.sln b/StyleCopAnalyzers.sln index 1ca396001..aa0e6767e 100644 --- a/StyleCopAnalyzers.sln +++ b/StyleCopAnalyzers.sln @@ -12,8 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{E359E4 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StyleCop.Analyzers.Test", "StyleCop.Analyzers\StyleCop.Analyzers.Test\StyleCop.Analyzers.Test.csproj", "{3EB54B68-A7AA-45E8-A97B-A0746712140B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StyleCop.Analyzers.Vsix", "StyleCop.Analyzers\StyleCop.Analyzers.Vsix\StyleCop.Analyzers.Vsix.csproj", "{06BEBB30-AC91-4470-8930-22F7722A25E4}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5F9532E9-B126-402A-B338-54431A4882B2}" ProjectSection(SolutionItems) = preProject .codecov.yml = .codecov.yml @@ -290,10 +288,6 @@ Global {3EB54B68-A7AA-45E8-A97B-A0746712140B}.Debug|Any CPU.Build.0 = Debug|Any CPU {3EB54B68-A7AA-45E8-A97B-A0746712140B}.Release|Any CPU.ActiveCfg = Release|Any CPU {3EB54B68-A7AA-45E8-A97B-A0746712140B}.Release|Any CPU.Build.0 = Release|Any CPU - {06BEBB30-AC91-4470-8930-22F7722A25E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {06BEBB30-AC91-4470-8930-22F7722A25E4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {06BEBB30-AC91-4470-8930-22F7722A25E4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {06BEBB30-AC91-4470-8930-22F7722A25E4}.Release|Any CPU.Build.0 = Release|Any CPU {C4B7092C-E1A9-4CF7-AE4C-D6A146392BA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C4B7092C-E1A9-4CF7-AE4C-D6A146392BA7}.Debug|Any CPU.Build.0 = Debug|Any CPU {C4B7092C-E1A9-4CF7-AE4C-D6A146392BA7}.Release|Any CPU.ActiveCfg = Release|Any CPU