diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1646UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1646UnitTests.cs
new file mode 100644
index 000000000..37bbcb7af
--- /dev/null
+++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/DocumentationRules/SA1646UnitTests.cs
@@ -0,0 +1,31 @@
+namespace StyleCop.Analyzers.Test.DocumentationRules
+{
+ using System.Collections.Generic;
+ using System.Linq;
+ using Microsoft.CodeAnalysis;
+ using Microsoft.CodeAnalysis.Diagnostics;
+ using StyleCop.Analyzers.DocumentationRules;
+ using TestHelper;
+ using Xunit;
+
+ ///
+ /// This class contains unit tests for .
+ ///
+ public class SA1646UnitTests : DiagnosticVerifier
+ {
+ [Fact]
+ public void TestDisabledByDefaultAndNotConfigurable()
+ {
+ var analyzer = this.GetCSharpDiagnosticAnalyzers().Single();
+ Assert.Equal(1, analyzer.SupportedDiagnostics.Length);
+ Assert.False(analyzer.SupportedDiagnostics[0].IsEnabledByDefault);
+ Assert.Contains(WellKnownDiagnosticTags.NotConfigurable, analyzer.SupportedDiagnostics[0].CustomTags);
+ }
+
+ ///
+ protected override IEnumerable GetCSharpDiagnosticAnalyzers()
+ {
+ yield return new SA1646IncludedDocumentationXPathDoesNotExist();
+ }
+ }
+}
diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj
index 854690d1f..b32d88bdf 100644
--- a/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj
+++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test/StyleCop.Analyzers.Test.csproj
@@ -153,6 +153,7 @@
+
diff --git a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs
index cd6fe4d36..ecc3dbca1 100644
--- a/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs
+++ b/StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1646IncludedDocumentationXPathDoesNotExist.cs
@@ -30,6 +30,7 @@
/// documentation file.
///
[DiagnosticAnalyzer(LanguageNames.CSharp)]
+ [NoDiagnostic("This is already handled by the compiler with warning CS1589.")]
[NoCodeFix("Cannot generate documentation")]
public class SA1646IncludedDocumentationXPathDoesNotExist : DiagnosticAnalyzer
{
@@ -43,7 +44,7 @@ public class SA1646IncludedDocumentationXPathDoesNotExist : DiagnosticAnalyzer
private const string HelpLink = "http://www.stylecop.com/docs/SA1646.html";
private static readonly DiagnosticDescriptor Descriptor =
- new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.DocumentationRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledNoTests, Description, HelpLink);
+ new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.DocumentationRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledByDefault, Description, HelpLink, WellKnownDiagnosticTags.NotConfigurable);
private static readonly ImmutableArray SupportedDiagnosticsValue =
ImmutableArray.Create(Descriptor);
@@ -60,7 +61,7 @@ public override ImmutableArray SupportedDiagnostics
///
public override void Initialize(AnalysisContext context)
{
- // TODO: Implement analysis
+ // This diagnostic is not implemented (by design) in StyleCopAnalyzers.
}
}
}