Skip to content

Migrate stopifnot() usages to cli_abort() #2793

Open
@MichaelChirico

Description

@MichaelChirico
          We do use `stopifnot()` in a few places, so I'd make that change separately if needed:
grep -nEr "^[^#\"]*stopifnot[(]" R
# R/unnecessary_concatenation_linter.R:55:  stopifnot(
# R/undesirable_function_linter.R:59:  stopifnot(is.logical(symbol_is_undesirable))
# R/make_linter_from_xpath.R:21:  stopifnot(
# R/make_linter_from_xpath.R:57:  stopifnot(
# R/xp_utils.R:80:  stopifnot(
# R/implicit_assignment_linter.R:65:  stopifnot(is.null(except) || is.character(except))
# R/methods.R:152:  stopifnot(requireNamespace("tibble", quietly = TRUE))
# R/methods.R:158:  stopifnot(requireNamespace("data.table", quietly = TRUE))

Originally posted by @MichaelChirico in #2791 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    consistency 🍎 🍏internalsIssues related to inner workings of lintr, i.e., not user-visible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions