Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spaces_inside_linter doesn't ignore trailing comments #636

Closed
MichaelChirico opened this issue Nov 30, 2020 · 0 comments · Fixed by #638
Closed

spaces_inside_linter doesn't ignore trailing comments #636

MichaelChirico opened this issue Nov 30, 2020 · 0 comments · Fixed by #638

Comments

@MichaelChirico
Copy link
Collaborator

MichaelChirico commented Nov 30, 2020

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 (.

@MichaelChirico MichaelChirico changed the title infix_spaces_linter doesn't ignore trailing comments spaces_inside_linter doesn't ignore trailing comments Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant