Skip to content

Commit 7e4c943

Browse files
Use simpler apply() approach (#2990)
1 parent 39fb754 commit 7e4c943

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

R/indentation_linter.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,13 +314,7 @@ indentation_linter <- function(indent = 2L, hanging_indent_style = c("tidy", "al
314314
type = "style",
315315
message = lint_messages,
316316
line = unname(source_expression$file_lines[bad_lines]),
317-
# TODO(#2467): Use ranges = apply(lint_ranges, 1L, list, simplify = FALSE).
318-
ranges = lapply(
319-
seq_along(bad_lines),
320-
function(i) {
321-
list(lint_ranges[i, ])
322-
}
323-
)
317+
ranges = apply(lint_ranges, 1L, list, simplify = FALSE)
324318
)
325319
})
326320
}

0 commit comments

Comments
 (0)