Skip to content

lint: unusedParam may give bad advices #516

@niya3

Description

@niya3

See: https://stackoverflow.com/a/22549439



    Unused variables are always a programming error, whereas it is common to write a function that doesn't use all of its arguments.

    One could leave those arguments unnamed (using _), but then that might confuse with functions like

    func foo(_ string, _ int) // what's this supposed to do?

    The names, even if they're unused, provide important documentation.

    Andrew

Maybe it should be marked as opinionated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions