Unverified Commit e7c6c437 authored by Nick Miller's avatar Nick Miller Committed by GitHub
Browse files

[ci] [R-package] Add period after specified linter names in `nolint` comments (#6950)

parent a5477646
......@@ -115,7 +115,7 @@ msg <- sprintf(
)
cat(msg)
install.packages( # nolint[undesirable_function]
install.packages( # nolint: undesirable_function.
pkgs = deps_to_install
, dependencies = c("Depends", "Imports", "LinkingTo")
, lib = Sys.getenv("R_LIB_PATH", unset = .libPaths()[[1L]])
......
.is_Booster <- function(x) {
return(all(c("R6", "lgb.Booster") %in% class(x))) # nolint: class_equals
return(all(c("R6", "lgb.Booster") %in% class(x))) # nolint: class_equals.
}
.is_Dataset <- function(x) {
return(all(c("R6", "lgb.Dataset") %in% class(x))) # nolint: class_equals
return(all(c("R6", "lgb.Dataset") %in% class(x))) # nolint: class_equals.
}
.is_Predictor <- function(x) {
return(all(c("R6", "lgb.Predictor") %in% class(x))) # nolint: class_equals
return(all(c("R6", "lgb.Predictor") %in% class(x))) # nolint: class_equals.
}
.is_null_handle <- function(x) {
......@@ -224,7 +224,7 @@
#' @importFrom parallel detectCores
.get_default_num_threads <- function() {
if (requireNamespace("RhpcBLASctl", quietly = TRUE)) { # nolint: undesirable_function
if (requireNamespace("RhpcBLASctl", quietly = TRUE)) { # nolint: undesirable_function.
return(RhpcBLASctl::get_num_cores())
} else {
msg <- "Optional package 'RhpcBLASctl' not found."
......
......@@ -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: undesirable_function
require("processx") # nolint: undesirable_function.
})
})
if (has_processx) {
......@@ -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: non_portable_path
pattern = "[Ordinal/Name Pointer] Table" # nolint: non_portable_path.
, x = objdump_results
, fixed = TRUE
)
......
......@@ -31,7 +31,7 @@ inst_dir <- file.path(R_PACKAGE_SOURCE, "inst", fsep = "/")
on_windows <- .Platform$OS.type == "windows"
has_processx <- suppressMessages({
suppressWarnings({
require("processx") # nolint: undesirable_function
require("processx") # nolint: undesirable_function, unused_import.
})
})
if (has_processx && on_windows) {
......
library(testthat)
library(lightgbm) # nolint: [unused_import]
library(lightgbm) # nolint: unused_import.
test_check(
package = "lightgbm"
......
......@@ -29,7 +29,7 @@ test_that(".params2str() passes through duplicated params", {
params = list(
objective = "regression"
, bagging_fraction = 0.8
, bagging_fraction = 0.5 # nolint: duplicate_argument
, bagging_fraction = 0.5 # nolint: duplicate_argument.
)
)
expect_equal(out_str, "objective=regression bagging_fraction=0.8 bagging_fraction=0.5")
......
......@@ -24,7 +24,7 @@ TEMP_SOURCE_DIR <- file.path(TEMP_R_DIR, "src")
, "make_args" = character(0L)
)
for (arg in args) {
if (any(grepl("^\\-j[0-9]+", arg))) { # nolint: non_portable_path
if (any(grepl("^\\-j[0-9]+", arg))) { # nolint: non_portable_path.
out_list[["make_args"]] <- arg
} else if (any(grepl("=", arg, fixed = TRUE))) {
split_arg <- strsplit(arg, "=", fixed = TRUE)[[1L]]
......@@ -147,7 +147,7 @@ if (length(parsed_args[["make_args"]]) > 0L) {
on_windows <- .Platform$OS.type == "windows"
has_processx <- suppressMessages({
suppressWarnings({
require("processx") # nolint: undesirable_function
require("processx") # nolint: undesirable_function, unused_import.
})
})
if (has_processx && on_windows) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment