Skip to content

Commit

Permalink
SA1648InheritDocMustBeUsedWithInheritingClass: Enable NRT
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyIX committed Nov 11, 2023
1 parent 836540c commit 62237f3
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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.DocumentationRules
{
using System;
Expand Down Expand Up @@ -70,7 +68,7 @@ public override void Initialize(AnalysisContext context)

private static void HandleBaseTypeLikeDeclaration(SyntaxNodeAnalysisContext context)
{
BaseTypeDeclarationSyntax baseType = context.Node as BaseTypeDeclarationSyntax;
BaseTypeDeclarationSyntax? baseType = context.Node as BaseTypeDeclarationSyntax;

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

private static bool HasXmlCrefAttribute(XmlNodeSyntax inheritDocElement)
{
XmlElementSyntax xmlElementSyntax = inheritDocElement as XmlElementSyntax;
XmlElementSyntax? xmlElementSyntax = inheritDocElement as XmlElementSyntax;
if (xmlElementSyntax?.StartTag?.Attributes.Any(SyntaxKind.XmlCrefAttribute) ?? false)
{
return true;
}

XmlEmptyElementSyntax xmlEmptyElementSyntax = inheritDocElement as XmlEmptyElementSyntax;
XmlEmptyElementSyntax? xmlEmptyElementSyntax = inheritDocElement as XmlEmptyElementSyntax;
if (xmlEmptyElementSyntax?.Attributes.Any(SyntaxKind.XmlCrefAttribute) ?? false)
{
return true;
Expand Down

0 comments on commit 62237f3

Please sign in to comment.