using System.Diagnostics.CodeAnalysis; namespace StellaOps.Scanner.Surface.Validation; /// /// Represents a single validation finding produced by a surface validator. /// public sealed record SurfaceValidationIssue( string Code, string Message, SurfaceValidationSeverity Severity, string? Hint = null) { public static SurfaceValidationIssue Info(string code, string message, string? hint = null) => new(code, message, SurfaceValidationSeverity.Info, hint); public static SurfaceValidationIssue Warning(string code, string message, string? hint = null) => new(code, message, SurfaceValidationSeverity.Warning, hint); public static SurfaceValidationIssue Error(string code, string message, string? hint = null) => new(code, message, SurfaceValidationSeverity.Error, hint); [MemberNotNullWhen(true, nameof(Hint))] public bool HasHint => !string.IsNullOrWhiteSpace(Hint); }