Skip to content

Commit e7c6c43

Browse files
authored
[ci] [R-package] Add period after specified linter names in nolint comments (#6950)
1 parent a547764 commit e7c6c43

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

.ci/install-r-deps.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ msg <- sprintf(
115115
)
116116
cat(msg)
117117

118-
install.packages( # nolint[undesirable_function]
118+
install.packages( # nolint: undesirable_function.
119119
pkgs = deps_to_install
120120
, dependencies = c("Depends", "Imports", "LinkingTo")
121121
, lib = Sys.getenv("R_LIB_PATH", unset = .libPaths()[[1L]])

R-package/R/utils.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.is_Booster <- function(x) {
2-
return(all(c("R6", "lgb.Booster") %in% class(x))) # nolint: class_equals
2+
return(all(c("R6", "lgb.Booster") %in% class(x))) # nolint: class_equals.
33
}
44

55
.is_Dataset <- function(x) {
6-
return(all(c("R6", "lgb.Dataset") %in% class(x))) # nolint: class_equals
6+
return(all(c("R6", "lgb.Dataset") %in% class(x))) # nolint: class_equals.
77
}
88

99
.is_Predictor <- function(x) {
10-
return(all(c("R6", "lgb.Predictor") %in% class(x))) # nolint: class_equals
10+
return(all(c("R6", "lgb.Predictor") %in% class(x))) # nolint: class_equals.
1111
}
1212

1313
.is_null_handle <- function(x) {
@@ -224,7 +224,7 @@
224224

225225
#' @importFrom parallel detectCores
226226
.get_default_num_threads <- function() {
227-
if (requireNamespace("RhpcBLASctl", quietly = TRUE)) { # nolint: undesirable_function
227+
if (requireNamespace("RhpcBLASctl", quietly = TRUE)) { # nolint: undesirable_function.
228228
return(RhpcBLASctl::get_num_cores())
229229
} else {
230230
msg <- "Optional package 'RhpcBLASctl' not found."

R-package/inst/make-r-def.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ message(sprintf("Creating '%s' from '%s'", OUT_DEF_FILE, IN_DLL_FILE))
2424
.pipe_shell_command_to_stdout <- function(command, args, out_file) {
2525
has_processx <- suppressMessages({
2626
suppressWarnings({
27-
require("processx") # nolint: undesirable_function
27+
require("processx") # nolint: undesirable_function.
2828
})
2929
})
3030
if (has_processx) {
@@ -71,7 +71,7 @@ invisible(file.remove(OBJDUMP_FILE))
7171
# see https://www.cs.colorado.edu/~main/cs1300/doc/mingwfaq.html
7272
start_index <- which(
7373
grepl(
74-
pattern = "[Ordinal/Name Pointer] Table" # nolint: non_portable_path
74+
pattern = "[Ordinal/Name Pointer] Table" # nolint: non_portable_path.
7575
, x = objdump_results
7676
, fixed = TRUE
7777
)

R-package/src/install.libs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ inst_dir <- file.path(R_PACKAGE_SOURCE, "inst", fsep = "/")
3131
on_windows <- .Platform$OS.type == "windows"
3232
has_processx <- suppressMessages({
3333
suppressWarnings({
34-
require("processx") # nolint: undesirable_function
34+
require("processx") # nolint: undesirable_function, unused_import.
3535
})
3636
})
3737
if (has_processx && on_windows) {

R-package/tests/testthat.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
library(testthat)
2-
library(lightgbm) # nolint: [unused_import]
2+
library(lightgbm) # nolint: unused_import.
33

44
test_check(
55
package = "lightgbm"

R-package/tests/testthat/test_utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ test_that(".params2str() passes through duplicated params", {
2929
params = list(
3030
objective = "regression"
3131
, bagging_fraction = 0.8
32-
, bagging_fraction = 0.5 # nolint: duplicate_argument
32+
, bagging_fraction = 0.5 # nolint: duplicate_argument.
3333
)
3434
)
3535
expect_equal(out_str, "objective=regression bagging_fraction=0.8 bagging_fraction=0.5")

build_r.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ TEMP_SOURCE_DIR <- file.path(TEMP_R_DIR, "src")
2424
, "make_args" = character(0L)
2525
)
2626
for (arg in args) {
27-
if (any(grepl("^\\-j[0-9]+", arg))) { # nolint: non_portable_path
27+
if (any(grepl("^\\-j[0-9]+", arg))) { # nolint: non_portable_path.
2828
out_list[["make_args"]] <- arg
2929
} else if (any(grepl("=", arg, fixed = TRUE))) {
3030
split_arg <- strsplit(arg, "=", fixed = TRUE)[[1L]]
@@ -147,7 +147,7 @@ if (length(parsed_args[["make_args"]]) > 0L) {
147147
on_windows <- .Platform$OS.type == "windows"
148148
has_processx <- suppressMessages({
149149
suppressWarnings({
150-
require("processx") # nolint: undesirable_function
150+
require("processx") # nolint: undesirable_function, unused_import.
151151
})
152152
})
153153
if (has_processx && on_windows) {

0 commit comments

Comments
 (0)