Skip to content

Commit

Permalink
Simplify xpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Jun 22, 2024
1 parent 396a239 commit 231abff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/seq_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ seq_linter <- function() {
seq_funcs <- xp_text_in_table(c("seq_len", "seq"))
sequence_xpath <- glue("
parent::expr[following-sibling::expr/SYMBOL[ {seq_funcs} ]]
/parent::expr/parent::expr[
expr/SYMBOL_FUNCTION_CALL[text() = 'unlist']
]"
/parent::expr[preceding-sibling::expr/SYMBOL_FUNCTION_CALL[text() = 'unlist']]"
)

## The actual order of the nodes is document order
Expand Down

0 comments on commit 231abff

Please sign in to comment.