private Diagnostic CreateDiagnostic(DiagnosticDescriptor descriptor, Action <DiagnosticBuilder> build)
    {
        var builder = new DiagnosticBuilder(source, syntaxTree);

        build(builder);
        var diagnostic = builder.Build(descriptor);

        return(diagnostic);
    }