Skip to content

Commit 59b75c9

Browse files
author
Stefan Fleck
committed
lint
1 parent ffd7eca commit 59b75c9

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

R/Logger.R

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@
267267
#'
268268
#' lg$config(cfg)
269269
#' lg$config(NULL)
270-
271270
NULL
272271

273272

@@ -751,7 +750,8 @@ LoggerGlue <- R6::R6Class(
751750
public = list(
752751

753752
fatal = function(..., caller = get_caller(-8L), .envir = parent.frame()){
754-
if (isTRUE(get("threshold", envir = self) < 100L)) return(invisible())
753+
if (identical(get("threshold", envir = self) < 100L, TRUE))
754+
return(invisible())
755755

756756
force(.envir)
757757
get("log", envir = self)(
@@ -764,7 +764,8 @@ LoggerGlue <- R6::R6Class(
764764
},
765765

766766
error = function(..., caller = get_caller(-8L), .envir = parent.frame()){
767-
if (isTRUE(get("threshold", envir = self) < 200L)) return(invisible())
767+
if (identical(get("threshold", envir = self) < 200L, TRUE))
768+
return(invisible())
768769

769770
get("log", envir = self)(
770771
...,
@@ -776,7 +777,8 @@ LoggerGlue <- R6::R6Class(
776777
},
777778

778779
warn = function(..., caller = get_caller(-8L), .envir = parent.frame()){
779-
if (isTRUE(get("threshold", envir = self) < 300L)) return(invisible())
780+
if (identical(get("threshold", envir = self) < 300L, TRUE))
781+
return(invisible())
780782

781783
get("log", envir = self)(
782784
...,
@@ -788,7 +790,8 @@ LoggerGlue <- R6::R6Class(
788790
},
789791

790792
info = function(..., caller = get_caller(-8L), .envir = parent.frame()){
791-
if (isTRUE(get("threshold", envir = self) < 400L)) return(invisible())
793+
if (identical(get("threshold", envir = self) < 400L, TRUE))
794+
return(invisible())
792795

793796
get("log", envir = self)(
794797
...,
@@ -800,7 +803,8 @@ LoggerGlue <- R6::R6Class(
800803
},
801804

802805
debug = function(..., caller = get_caller(-8L), .envir = parent.frame()){
803-
if (isTRUE(get("threshold", envir = self) < 500L)) return(invisible())
806+
if (identical(get("threshold", envir = self) < 500L, TRUE))
807+
return(invisible())
804808

805809
force(.envir)
806810
get("log", envir = self)(
@@ -813,7 +817,8 @@ LoggerGlue <- R6::R6Class(
813817
},
814818

815819
trace = function(..., caller = get_caller(-8L), .envir = parent.frame()){
816-
if (isTRUE(get("threshold", envir = self) < 600L)) return(invisible())
820+
if (identical(get("threshold", envir = self) < 600L, TRUE))
821+
return(invisible())
817822

818823
force(.envir)
819824
get("log", envir = self)(
@@ -832,7 +837,8 @@ LoggerGlue <- R6::R6Class(
832837
caller = get_caller(-7),
833838
.envir = parent.frame()
834839
){
835-
if (identical(get("threshold", envir = self), 0L)) return(invisible())
840+
if (identical(get("threshold", envir = self), 0L))
841+
return(invisible())
836842

837843
force(.envir)
838844
tryCatch({

0 commit comments

Comments
 (0)