You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2402 exposed an issue about preceding-sibling::*[1] including COMMENT by mistake. Took a quick look for similar such bugs and immediately found one in keyword_quote_linter():
lint("a$ # comment\n'b'", keyword_quote_linter())
# <text>:2:1: warning: [keyword_quote_linter] Only quote targets of extraction with # comment if necessary, i.e., if the name is not a valid R symbol (see ?make.names). Use backticks to create non-syntactic names, or use slot() to extract by string.# 'b'# ^~~
# comment in the lint message is supposed to be $.
Filing this issue to fix this and other such instances throughout the codebase. Since they've gone unnoticed thus far, they're mainly about cases where comments go in "unusual" places, but it can't hurt to be more robust.
The text was updated successfully, but these errors were encountered:
Same for preceding-sibling::expr/following-sibling::expr which might unintentionally skip equal_assign or expr_or_assign_or_help expr-ish nodes, a la#2444.
I think the way forward here is #2191 -- once we get some infrastructure set up for "jiggling" tests, we can do a "fuzz" where we insert COMMENT nodes at random places in the AST.
#2402 exposed an issue about
preceding-sibling::*[1]
includingCOMMENT
by mistake. Took a quick look for similar such bugs and immediately found one inkeyword_quote_linter()
:# comment
in the lint message is supposed to be$
.Filing this issue to fix this and other such instances throughout the codebase. Since they've gone unnoticed thus far, they're mainly about cases where comments go in "unusual" places, but it can't hurt to be more robust.
The text was updated successfully, but these errors were encountered: