Skip to content

A parameter isn't being used in suggestReplacement #25

@atifdev10

Description

@atifdev10

Why isn't the severity parameter being used here? Was it supposed to be the parameter of SimpleDiagnosticMessage or not?

public func suggestReplacement(
        _ message: String? = nil,
        messageID: MessageID? = nil,
        severity: DiagnosticSeverity = .error,
        old: some SyntaxProtocol,
        new: some SyntaxProtocol
    ) -> Self {
        fixIt(
            FixIt(
                message: SimpleDiagnosticMessage(
                    message: message ?? "suggested replacement",
                    diagnosticID: messageID ?? self.messageID,
                    severity: .error
                ),
                changes: [
                    FixIt.Change.replace(
                        oldNode: Syntax(old),
                        newNode: Syntax(new)
                    )
                ]
            ))
    }

Diagnostics 103

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions