< Summary - pva.SuperV

Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 58
Line coverage: 100%
Branch coverage
75%
Covered branches: 3
Total branches: 4
Branch coverage: 75%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: ValidateIdentifier(...)75%44100%
File 2: IdentifierNameRegex()100%11100%

File(s)

/home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Engine/IdentifierValidation.cs

#LineLine coverage
 1using pva.SuperV.Engine.Exceptions;
 2using System.Text.RegularExpressions;
 3
 4namespace pva.SuperV.Engine
 5{
 6    /// <summary>
 7    ///  Validates an identifier so that t can be used as a C# namespace (project), class (class) or property (field).
 8    /// </summary>
 9    internal static partial class IdentifierValidation
 10    {
 11        /// <summary>Regex for validating identifier name.</summary>
 12        [GeneratedRegex(Constants.IdentifierNamePattern)]
 13        private static partial Regex IdentifierNameRegex();
 14
 15        /// <summary>
 16        /// Validates the identifier foe an entity.
 17        /// </summary>
 18        /// <param name="entityType">Type of entity.</param>
 19        /// <param name="identifier">Identifier to be validated.</param>
 20        /// <returns>Validated identifier.</returns>
 21        /// <exception cref="InvalidIdentifierNameException"></exception>
 22        public static string ValidateIdentifier(string entityType, string? identifier)
 528323        {
 528324            if (string.IsNullOrEmpty(identifier) || !IdentifierNameRegex().IsMatch(identifier))
 1425            {
 1426                throw new InvalidIdentifierNameException(entityType, identifier, Constants.IdentifierNamePattern);
 27            }
 526928            return identifier;
 526929        }
 30    }
 31}

/home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Engine/obj/Debug/net9.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs

File '/home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Engine/obj/Debug/net9.0/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs' does not exist (any more).