diff --git a/.ci/.lintr.R b/.ci/.lintr.R index 263c28630a..6659efbc82 100644 --- a/.ci/.lintr.R +++ b/.ci/.lintr.R @@ -54,13 +54,11 @@ linters = c(dt_linters, all_linters( todo_comment_linter = NULL, # TODO(michaelchirico): Enforce these and re-activate them one-by-one. brace_linter = NULL, - condition_call_linter = NULL, fixed_regex_linter = NULL, if_not_else_linter = NULL, implicit_assignment_linter = NULL, implicit_integer_linter = NULL, keyword_quote_linter = NULL, - nzchar_linter = NULL, object_overwrite_linter = NULL, paren_body_linter = NULL, redundant_equals_linter = NULL, @@ -98,6 +96,7 @@ exclusions = c(local({ undesirable_operator_linter = Inf, # For ':::', possibly we could be more careful to only exclude ':::'. # TODO(michaelchirico): Enforce these and re-activate them one-by-one. comparison_negation_linter = Inf, + condition_call_linter = Inf, duplicate_argument_linter = Inf, equals_na_linter = Inf, missing_argument_linter = Inf, diff --git a/inst/tests/benchmark.Rraw b/inst/tests/benchmark.Rraw index 2a183453b7..957c297fa7 100644 --- a/inst/tests/benchmark.Rraw +++ b/inst/tests/benchmark.Rraw @@ -490,7 +490,7 @@ out = capture.output(print(DT)) tt = out[grep("V",out)] tt = unlist(strsplit(gsub(" ","",tt), "V")) test(1982.1, tt[1L], "") -tt = as.integer(tt[tt!=""]) +tt = as.integer(tt[nzchar(tt)]) test(1982.2, tt, seq_along(tt)) # fread leak, #3292 diff --git a/inst/tests/other.Rraw b/inst/tests/other.Rraw index 72d9c89756..80066b304d 100644 --- a/inst/tests/other.Rraw +++ b/inst/tests/other.Rraw @@ -408,7 +408,7 @@ if (loaded[["yaml"]]) { # csvy; #1701. Was 2032-2033 in tests.Rraw, #5516 fwrite(DT, f<-tempfile(), bom=TRUE, yaml=TRUE) fcon = file(f, encoding="UTF-8") # Windows readLines needs to be told; see also test 1658.50 in tests.Rraw lines = readLines(fcon) - lines = lines[lines!=""] # an extra "" after "eol: |2+" (line 16) on Linux but not Windows + lines = lines[nzchar(lines)] # an extra "" after "eol: |2+" (line 16) on Linux but not Windows # remove the blank here so we don't need to change this test if/when that changes in yaml package test(17.11, length(lines), 48L) close(fcon) @@ -417,7 +417,7 @@ if (loaded[["yaml"]]) { # csvy; #1701. Was 2032-2033 in tests.Rraw, #5516 fwrite(DT, f<-tempfile(), bom=TRUE, yaml=TRUE) fcon = file(f, encoding="UTF-8") lines = readLines(fcon) - lines = lines[lines!=""] + lines = lines[nzchar(lines)] test(17.13, length(lines), 48L) close(fcon) test(17.14, fread(f), DT)