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
ef469d80
Unverified
Commit
ef469d80
authored
Jun 20, 2022
by
CuriousCorrelation
Committed by
GitHub
Jun 20, 2022
Browse files
[ci] [R-package] Add class_equals linter (#5307)
parent
c53ac33b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
.ci/lint_r_code.R
.ci/lint_r_code.R
+1
-0
R-package/R/utils.R
R-package/R/utils.R
+3
-3
No files found.
.ci/lint_r_code.R
View file @
ef469d80
...
@@ -33,6 +33,7 @@ LINTERS_TO_USE <- list(
...
@@ -33,6 +33,7 @@ LINTERS_TO_USE <- list(
,
"any_is_na_linter"
=
lintr
::
any_is_na_linter
()
,
"any_is_na_linter"
=
lintr
::
any_is_na_linter
()
,
"assignment"
=
lintr
::
assignment_linter
()
,
"assignment"
=
lintr
::
assignment_linter
()
,
"braces"
=
lintr
::
brace_linter
()
,
"braces"
=
lintr
::
brace_linter
()
,
"class_equals_linter"
=
lintr
::
class_equals_linter
()
,
"commas"
=
lintr
::
commas_linter
()
,
"commas"
=
lintr
::
commas_linter
()
,
"equals_na"
=
lintr
::
equals_na_linter
()
,
"equals_na"
=
lintr
::
equals_na_linter
()
,
"function_left"
=
lintr
::
function_left_parentheses_linter
()
,
"function_left"
=
lintr
::
function_left_parentheses_linter
()
...
...
R-package/R/utils.R
View file @
ef469d80
lgb.is.Booster
<-
function
(
x
)
{
lgb.is.Booster
<-
function
(
x
)
{
return
(
all
(
c
(
"R6"
,
"lgb.Booster"
)
%in%
class
(
x
)))
return
(
all
(
c
(
"R6"
,
"lgb.Booster"
)
%in%
class
(
x
)))
# nolint: class_equals_linter
}
}
lgb.is.Dataset
<-
function
(
x
)
{
lgb.is.Dataset
<-
function
(
x
)
{
return
(
all
(
c
(
"R6"
,
"lgb.Dataset"
)
%in%
class
(
x
)))
return
(
all
(
c
(
"R6"
,
"lgb.Dataset"
)
%in%
class
(
x
)))
# nolint: class_equals_linter
}
}
lgb.is.Predictor
<-
function
(
x
)
{
lgb.is.Predictor
<-
function
(
x
)
{
return
(
all
(
c
(
"R6"
,
"lgb.Predictor"
)
%in%
class
(
x
)))
return
(
all
(
c
(
"R6"
,
"lgb.Predictor"
)
%in%
class
(
x
)))
# nolint: class_equals_linter
}
}
lgb.is.null.handle
<-
function
(
x
)
{
lgb.is.null.handle
<-
function
(
x
)
{
...
...
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