Skip to content

Commit

Permalink
Permanently disable SA1644 (Documentation headers should not contain …
Browse files Browse the repository at this point in the history
…blank lines)

Closes DotNetAnalyzers#164
  • Loading branch information
sharwell committed Jan 31, 2019
1 parent b1a92b6 commit 098f8fa
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

namespace StyleCop.Analyzers.Test.CSharp7.DocumentationRules
{
using StyleCop.Analyzers.Test.DocumentationRules;

public class SA1644CSharp7UnitTests : SA1644UnitTests
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.

namespace StyleCop.Analyzers.Test.DocumentationRules
{
using Microsoft.CodeAnalysis;
using StyleCop.Analyzers.DocumentationRules;
using Xunit;

/// <summary>
/// This class contains unit tests for <see cref="SA1644DocumentationHeadersMustNotContainBlankLines"/>.
/// </summary>
public class SA1644UnitTests
{
[Fact]
public void TestDisabledByDefaultAndNotConfigurable()
{
var analyzer = new SA1644DocumentationHeadersMustNotContainBlankLines();
Assert.Single(analyzer.SupportedDiagnostics);
Assert.False(analyzer.SupportedDiagnostics[0].IsEnabledByDefault);
Assert.Contains(WellKnownDiagnosticTags.NotConfigurable, analyzer.SupportedDiagnostics[0].CustomTags);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ internal class SA1644DocumentationHeadersMustNotContainBlankLines : DiagnosticAn
private const string HelpLink = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1644.md";

private static readonly DiagnosticDescriptor Descriptor =
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.DocumentationRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledNoTests, Description, HelpLink, WellKnownDiagnosticTags.NotConfigurable);
new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.DocumentationRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledByDefault, Description, HelpLink, WellKnownDiagnosticTags.NotConfigurable);

/// <inheritdoc/>
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } =
Expand All @@ -75,7 +75,7 @@ internal class SA1644DocumentationHeadersMustNotContainBlankLines : DiagnosticAn
/// <inheritdoc/>
public override void Initialize(AnalysisContext context)
{
// TODO: Implement analysis
// This diagnostic is not implemented (by design) in StyleCopAnalyzers.
}
}
}
1 change: 1 addition & 0 deletions documentation/KnownChanges.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ lists each of these issues, along with a link to the issue where the decision wa
| SA1630 | Documentation text should contain whitespace | [#1057](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1057) |
| SA1631 | Documentation should meet character percentage | [#1057](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1057) |
| SA1632 | Documentation text should meet minimum character length | [#1057](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1057) |
| SA1644 | DocumentationHeadersMustNotContainBlankLines | [#164](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/164) |
| SA1645 | Included documentation file does not exist | [#165](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/165) |
| SA1646 | Included documentation XPath does not exist | [#166](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/166) |
| SA1647 | Include node does not contain valid file and path | [#167](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/167) |
Expand Down
3 changes: 3 additions & 0 deletions documentation/SA1644.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
</tr>
</table>

:warning: This rule has been intentionally omitted from StyleCop Analyzers. See [KnownChanges.md](KnownChanges.md) for
additional information.

## Cause

A section within the Xml documentation header for a C# element contains blank lines.
Expand Down

0 comments on commit 098f8fa

Please sign in to comment.