Skip to content

is_valid_regex needs to set perl=TRUE #2375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MichaelChirico opened this issue Dec 1, 2023 · 0 comments · Fixed by #2376
Closed

is_valid_regex needs to set perl=TRUE #2375

MichaelChirico opened this issue Dec 1, 2023 · 0 comments · Fixed by #2376

Comments

@MichaelChirico
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant