Skip to content

spaces_inside_linter doesn't ignore trailing comments #636

Description

@MichaelChirico

Found in the course of working on #598

writeLines("
lm( # cool regression
 y ~ x
)
", tmp <- tempfile())

lintr::lint(tmp, lintr::spaces_inside_linter)
# /tmp/RtmpAD3BJR/file41eb53c52da:2:4: style: Do not place spaces around code in parentheses or square brackets.
# lm( # cool regression
#    ^

trailing whitespace should be ignored if there is no code after the the (.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions