Skip to content

Comment in glue() range causes parse failure in object_usage_linter #1919

@MichaelChirico

Description

@MichaelChirico
lint("
foo <- function() {
  x <- 2
  glue::glue(
    '{x}' # a comment
  )
}
", object_usage_linter())
# Error: Linter 'object_usage_linter' failed in /tmp/RtmpAirXij/file39151e5be6f486: Unexpected failure to parse glue call, please report: <text>:2:0: unexpected end of input
# 1: glue::glue('{x}'# a comment)
#    ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorobject linters 🏀

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions