Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,20 @@ print.lints <- function(x, ...) {
}

if (isTRUE(settings$error_on_lint)) {
quit("no", 31L, FALSE) # nocov
stop(sprintf(
ngettext(length(x),
"Linting failed with %i issue",
"Linting failed with %i issues"
), length(x)
), call. = FALSE)
}

} else if (use_rstudio_source_markers) {
# Empty lints: clear RStudio source markers
rstudio_source_markers(x)
}


invisible(x)
}

Expand Down
2 changes: 1 addition & 1 deletion R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ settings <- NULL
"n71nn28")
, 54L - 13L),
comment_bot = logical_env("LINTR_COMMENT_BOT") %||% TRUE,
error_on_lint = logical_env("LINTR_ERROR_ON_LINT") %||% FALSE
error_on_lint = logical_env("LINTR_ERROR_ON_LINT") %||% TRUE
)

settings <<- list2env(default_settings, parent = emptyenv())
Expand Down