Unverified Commit ef469d80 authored by CuriousCorrelation's avatar CuriousCorrelation Committed by GitHub
Browse files

[ci] [R-package] Add class_equals linter (#5307)

parent c53ac33b
...@@ -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()
......
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) {
......
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