Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug: No errors found triggers as an error #22

@DeepanshKhurana

Description

@DeepanshKhurana

Is there a chance that the message is something like the following?

> check_text_error("No error found")
[1] TRUE

If yes, maybe to explicit that the string start with one of the wordlist is enough, like the following:

check_text_error <- function(
    text,
    wordlist = c("halt", "err", "terminat", "not found"),
    ignore_case = TRUE
) {
  grepl(
    paste0("^", wordlist, collapse = "|"),
    text,
    ignore.case = ignore_case
  )
}

check_text_error("No error found")
check_text_error("Error: aaa")

Originally posted by @vituri in #15 (comment)

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