Skip to content

fixed_regex_linter throws on pattern = pattern #2159

Closed
@MichaelChirico

Description

@MichaelChirico
lint("gregexpr(pattern = pattern, data, perl = TRUE, ...)\n", fixed_regex_linter())
# <text>:1:20: warning: [fixed_regex_linter] This regular expression is static, i.e., its matches can be expressed as a fixed substring expression, which is faster to compute. Here, you can use "pattern" with fixed = TRUE.
# gregexpr(pattern = pattern, data, perl = TRUE, ...)
#                    ^~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    false-positivecode that shouldn't lint, but does

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions