Skip to content

A parameter isn't being used in suggestReplacement #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
atifdev10 opened this issue Dec 21, 2024 · 1 comment
Closed

A parameter isn't being used in suggestReplacement #25

atifdev10 opened this issue Dec 21, 2024 · 1 comment

Comments

@atifdev10
Copy link
Contributor

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

@atifdev10 atifdev10 changed the title Parameter isn't being used in suggestReplacement A parameter isn't being used in suggestReplacement Dec 21, 2024
@stackotter
Copy link
Owner

Oops good catch! Fixed it now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants