< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.BuildTools.DiagnosticDescriptors
Assembly: CoreWCF.BuildTools.Roslyn3.11
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.BuildTools/src/DiagnosticDescriptors.cs
Line coverage
100%
Covered lines: 49
Uncovered lines: 0
Coverable lines: 49
Total lines: 83
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.BuildTools/src/DiagnosticDescriptors.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using Microsoft.CodeAnalysis;
 5
 6namespace CoreWCF.BuildTools;
 7
 8internal static class DiagnosticDescriptors
 9{
 10    internal static class OperationParameterInjectionGenerator_01XX
 11    {
 112        internal static readonly DiagnosticDescriptor ParentClassShouldBePartialError = new DiagnosticDescriptor(id: "CO
 113            title: "Parent class should be partial",
 114            messageFormat: "Parent class '{0}' of method '{1}' should be partial",
 115            category: nameof(OperationParameterInjectionGenerator),
 116            DiagnosticSeverity.Error,
 117            isEnabledByDefault: true);
 18
 2419        internal static Diagnostic RaiseParentClassShouldBePartialError(string parentClassName, string methodName, Locat
 20
 121        internal static readonly DiagnosticDescriptor PropertyNameCannotBeNullOrEmptyError = new DiagnosticDescriptor(id
 122            title: "PropertyName cannot be null or empty",
 123            messageFormat: "PropertyName value of CoreWCF.InjectedAttribute cannot be null or empty",
 124            category: nameof(OperationParameterInjectionGenerator),
 125            DiagnosticSeverity.Error,
 126            isEnabledByDefault: true);
 27
 828        internal static Diagnostic RaisePropertyNameCannotBeNullOrEmptyError(Location location) => Diagnostic.Create(Pro
 29
 130        internal static readonly DiagnosticDescriptor EitherPropertyNameOrServiceKeyShouldBeSpecified = new DiagnosticDe
 131            title: "Either PropertyName or ServiceKey should be specified",
 132            messageFormat: "PropertyName value of CoreWCF.InjectedAttribute cannot be null or empty",
 133            category: nameof(OperationParameterInjectionGenerator),
 134            DiagnosticSeverity.Error,
 135            isEnabledByDefault: true);
 36
 837        internal static Diagnostic RaiseEitherPropertyNameOrServiceKeyShouldBeSpecified(Location location) => Diagnostic
 38    }
 39
 40    internal static class AuthorizationAttributesAnalyzer_02XX
 41    {
 142        internal static readonly DiagnosticDescriptor AllowAnonymousAttributeIsNotSupported = new DiagnosticDescriptor(i
 143            title: "[AllowAnonymous] attribute is not supported",
 144            messageFormat: "[AllowAnonymous] attribute is not supported",
 145            category: nameof(AuthorizationAttributesAnalyzer),
 146            DiagnosticSeverity.Warning,
 147            isEnabledByDefault: true);
 48
 1649        internal static Diagnostic AllowAnonymousAttributeIsNotSupportedWarning(Location location) => Diagnostic.Create(
 50
 151        internal static readonly DiagnosticDescriptor AuthorizeDataAuthenticationSchemesPropertyIsNotSupported = new Dia
 152            title: "Specifying 'AuthenticationSchemes' property of [Authorize] attribute is not supported",
 153            messageFormat: "Specifying 'AuthenticationSchemes' property of [Authorize] attribute is not supported",
 154            category: nameof(AuthorizationAttributesAnalyzer),
 155            DiagnosticSeverity.Warning,
 156            isEnabledByDefault: true);
 57
 458        internal static Diagnostic AuthorizeDataAuthenticationSchemesPropertyIsNotSupportedWarning(Location location) =>
 59
 160        internal static readonly DiagnosticDescriptor AuthorizeDataRolesPropertyIsNotSupported = new DiagnosticDescripto
 161            title: "Specifying 'Roles' property of [Authorize] attribute is not supported",
 162            messageFormat: "Specifying 'Roles' property of [Authorize] attribute is not supported",
 163            category: nameof(AuthorizationAttributesAnalyzer),
 164            DiagnosticSeverity.Warning,
 165            isEnabledByDefault: true);
 66
 467        internal static Diagnostic AuthorizeDataRolesPropertyIsNotSupportedWarning(Location location) => Diagnostic.Crea
 68    }
 69
 70    internal static class PrivateServiceContractAnalyzer__03XX
 71    {
 172        internal static readonly DiagnosticDescriptor PrivateServiceContract = new DiagnosticDescriptor(id: "COREWCF_030
 173            title: "Private ServiceContract interface",
 174            messageFormat: "ServiceContract '{0}' accessibility should at least be internal to generate an OperationInvo
 175            category: nameof(PrivateServiceContractAnalyzer),
 176            DiagnosticSeverity.Warning,
 177            isEnabledByDefault: true);
 78
 79        internal static Diagnostic PrivateServiceContractError(string serviceContract, Location location) =>
 880            Diagnostic.Create(PrivateServiceContract, location, serviceContract);
 81    }
 82}
 83