Skip to content

Add a linter to check that arguments after an argument with default value have a default value as well #450

Closed

Description

@paulponcet

It seems good practice to avoid arguments without a default value if a preceding argument already has a default value:

# Bad
function(x, y = 1, z) {
  # some code
}

# Good
function(x, y = 1, z = 0) {
  # some code
}

# Good as well
function(x, z, y = 1) {
  # some code
}

Activity

  1. added
    feature
    on Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions