Skip to content

is_valid_regex needs to set perl=TRUE #2375

Closed
@MichaelChirico

Description

@MichaelChirico

a separate, minor issue with lintr:::is_valid_regex:

lintr:::is_valid_regex(lintr::default_settings$exclude_linter) # FALSE

Hmm, that's just because is_valid_regex() uses perl = FALSE, it works with perl = TRUE:

!inherits(tryCatch(grepl(lintr::default_settings$exclude_linter, "", perl = TRUE), condition = identity), "condition")
# [1] TRUE

Originally posted by @MichaelChirico in #2374 (comment)

Ultimately parse_exclusions() is running rex::re_matches(), which in turn runs perl = TRUE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions