File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2727# ' @seealso [linters] for a complete list of linters available in lintr.
2828# ' @export
2929sprintf_linter <- function () {
30- fmt_by_name_xpath <- " SYMBOL_SUB[text() = 'fmt']/following-sibling::expr[1]/STR_CONST"
3130 call_xpath <- glue :: glue("
3231 parent::expr[
3332 not(expr/SYMBOL[text() = '...'])
@@ -99,7 +98,10 @@ sprintf_linter <- function() {
9998 sprintf_calls <- xml_find_all(xml_calls , call_xpath )
10099 in_pipeline <- ! is.na(xml_find_first(sprintf_calls , in_pipe_xpath ))
101100
102- fmt_by_name <- get_r_string(sprintf_calls , fmt_by_name_xpath )
101+ fmt_by_name <- get_r_string(
102+ sprintf_calls ,
103+ " SYMBOL_SUB[text() = 'fmt']/following-sibling::expr[1]/STR_CONST"
104+ )
103105 fmt_by_pos <- get_r_string(
104106 sprintf_calls ,
105107 " OP-LEFT-PAREN/following-sibling::expr[1]/STR_CONST"
You can’t perform that action at this time.
0 commit comments