Skip to content

False positives in spaces_left_parentheses_linter #780

Closed

Description

@MichaelChirico

All of the following generate lints currently; I don't think any of them should:

lintr::lint("x**(y + z)\n", lintr::spaces_left_parentheses_linter())
lintr::lint("'[[<-.data.frame'(object, y)\n", lintr::spaces_left_parentheses_linter())
lintr::lint("object@data@get('input')\n", lintr::spaces_left_parentheses_linter())
lintr::lint("x <- ~(. +y)\n", lintr::spaces_left_parentheses_linter())
lintr::lint("for (ii in 1:10) next()\n", lintr::spaces_left_parentheses_linter())
lintr::lint("for (ii in 1:10) break()\n", lintr::spaces_left_parentheses_linter())
# the internal newline is necessary here, not sure why
lintr::lint("if (x > 1)\n  x <- x[-(i)]", lintr::spaces_left_parentheses_linter())

All of these are handled by the refactor in #724

Activity

  1. added this to the 3.0.0 milestone on Mar 11, 2021
  2. added
    bug
    on Mar 12, 2021
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions