Skip to content

Commit 62237f3

Browse files
committed
SA1648InheritDocMustBeUsedWithInheritingClass: Enable NRT
1 parent 836540c commit 62237f3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

StyleCop.Analyzers/StyleCop.Analyzers/DocumentationRules/SA1648InheritDocMustBeUsedWithInheritingClass.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4-
#nullable disable
5-
64
namespace StyleCop.Analyzers.DocumentationRules
75
{
86
using System;
@@ -70,7 +68,7 @@ public override void Initialize(AnalysisContext context)
7068

7169
private static void HandleBaseTypeLikeDeclaration(SyntaxNodeAnalysisContext context)
7270
{
73-
BaseTypeDeclarationSyntax baseType = context.Node as BaseTypeDeclarationSyntax;
71+
BaseTypeDeclarationSyntax? baseType = context.Node as BaseTypeDeclarationSyntax;
7472

7573
// baseType can be null here if we are looking at a delegate declaration
7674
if (baseType != null && baseType.BaseList != null && baseType.BaseList.Types.Any())
@@ -258,13 +256,13 @@ private static void HandleMemberDeclaration(SyntaxNodeAnalysisContext context)
258256

259257
private static bool HasXmlCrefAttribute(XmlNodeSyntax inheritDocElement)
260258
{
261-
XmlElementSyntax xmlElementSyntax = inheritDocElement as XmlElementSyntax;
259+
XmlElementSyntax? xmlElementSyntax = inheritDocElement as XmlElementSyntax;
262260
if (xmlElementSyntax?.StartTag?.Attributes.Any(SyntaxKind.XmlCrefAttribute) ?? false)
263261
{
264262
return true;
265263
}
266264

267-
XmlEmptyElementSyntax xmlEmptyElementSyntax = inheritDocElement as XmlEmptyElementSyntax;
265+
XmlEmptyElementSyntax? xmlEmptyElementSyntax = inheritDocElement as XmlEmptyElementSyntax;
268266
if (xmlEmptyElementSyntax?.Attributes.Any(SyntaxKind.XmlCrefAttribute) ?? false)
269267
{
270268
return true;

0 commit comments

Comments
 (0)