Skip to content

Simplify ad-hoc lapply with simpler apply() when we can (R>4.1.0) #2467

Open
@MichaelChirico

Description

@MichaelChirico

The loop here:

ranges = lapply(
seq_along(bad_lines),
function(i) {
list(lint_ranges[i, ])
}
)

Can be replaced with ranges = apply(lint_ranges, 1L, list, simplify = FALSE) per @AshesITR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked-externalIssues that are blocked by something outside of lintr's direct controlinternalsIssues related to inner workings of lintr, i.e., not user-visible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions