Skip to content

Commit

Permalink
[R-package] Specify concrete linting rule that is being ignored via `…
Browse files Browse the repository at this point in the history
…nolint` mark (#5300)

* Update make-r-def.R

* Update make-r-def.R

* Update build_r.R

* Update utils.R

* Update install.libs.R
  • Loading branch information
StrikerRUS authored Jun 19, 2022
1 parent 2f5baa3 commit e08cffb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R-package/R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ lgb.check.wrapper_param <- function(main_param_name, params, alternative_kwarg_v

#' @importFrom parallel detectCores
lgb.get.default.num.threads <- function() {
if (requireNamespace("RhpcBLASctl", quietly = TRUE)) { # nolint
if (requireNamespace("RhpcBLASctl", quietly = TRUE)) { # nolint: undesirable_function
return(RhpcBLASctl::get_num_cores())
} else {
msg <- "Optional package 'RhpcBLASctl' not found."
Expand Down
4 changes: 2 additions & 2 deletions R-package/inst/make-r-def.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ message(sprintf("Creating '%s' from '%s'", OUT_DEF_FILE, IN_DLL_FILE))
.pipe_shell_command_to_stdout <- function(command, args, out_file) {
has_processx <- suppressMessages({
suppressWarnings({
require("processx") # nolint
require("processx") # nolint: undesirable_function
})
})
if (has_processx) {
Expand Down Expand Up @@ -71,7 +71,7 @@ invisible(file.remove(OBJDUMP_FILE))
# see https://www.cs.colorado.edu/~main/cs1300/doc/mingwfaq.html
start_index <- which(
grepl(
pattern = "[Ordinal/Name Pointer] Table" # nolint
pattern = "[Ordinal/Name Pointer] Table" # nolint: non_portable_path
, x = objdump_results
, fixed = TRUE
)
Expand Down
2 changes: 1 addition & 1 deletion R-package/src/install.libs.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inst_dir <- file.path(R_PACKAGE_SOURCE, "inst", fsep = "/")
on_windows <- .Platform$OS.type == "windows"
has_processx <- suppressMessages({
suppressWarnings({
require("processx") # nolint
require("processx") # nolint: undesirable_function
})
})
if (has_processx && on_windows) {
Expand Down
2 changes: 1 addition & 1 deletion build_r.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ if (length(parsed_args[["make_args"]]) > 0L) {
on_windows <- .Platform$OS.type == "windows"
has_processx <- suppressMessages({
suppressWarnings({
require("processx") # nolint
require("processx") # nolint: undesirable_function
})
})
if (has_processx && on_windows) {
Expand Down

0 comments on commit e08cffb

Please sign in to comment.