Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
e7c6c437
Unverified
Commit
e7c6c437
authored
Jun 20, 2025
by
Nick Miller
Committed by
GitHub
Jun 20, 2025
Browse files
[ci] [R-package] Add period after specified linter names in `nolint` comments (#6950)
parent
a5477646
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
.ci/install-r-deps.R
.ci/install-r-deps.R
+1
-1
R-package/R/utils.R
R-package/R/utils.R
+4
-4
R-package/inst/make-r-def.R
R-package/inst/make-r-def.R
+2
-2
R-package/src/install.libs.R
R-package/src/install.libs.R
+1
-1
R-package/tests/testthat.R
R-package/tests/testthat.R
+1
-1
R-package/tests/testthat/test_utils.R
R-package/tests/testthat/test_utils.R
+1
-1
build_r.R
build_r.R
+2
-2
No files found.
.ci/install-r-deps.R
View file @
e7c6c437
...
...
@@ -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
]])
...
...
R-package/R/utils.R
View file @
e7c6c437
.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."
...
...
R-package/inst/make-r-def.R
View file @
e7c6c437
...
...
@@ -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
)
...
...
R-package/src/install.libs.R
View file @
e7c6c437
...
...
@@ -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
)
{
...
...
R-package/tests/testthat.R
View file @
e7c6c437
library
(
testthat
)
library
(
lightgbm
)
# nolint:
[
unused_import
]
library
(
lightgbm
)
# nolint: unused_import
.
test_check
(
package
=
"lightgbm"
...
...
R-package/tests/testthat/test_utils.R
View file @
e7c6c437
...
...
@@ -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"
)
...
...
build_r.R
View file @
e7c6c437
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment