Skip to content

include rlang::int(1) and similar in literal_coercion_linter #1382

Closed
@MichaelChirico

Description

@MichaelChirico

rlang::int() is really meant to be a typed builder like c(1, 2, 3) with specified output type like

rlang::int(1, 3, 5) == c(1L, 3L, 5L)
rlang::chr("a", "b", "c") = c("a", "b", "c")

but if ...lengths() == 1, it seems reasonable to just use a literal instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementgood first issue ❤️good issue for first-time contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions