Skip to content

Commit 653d2c6

Browse files
committed
Excluding test from safe logging checks
1 parent 7009484 commit 653d2c6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/linting/extended_checks.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,12 @@ function all_arguments_are_safe(x::EXPR)
564564
return true
565565
end
566566

567-
function check(t::LogStatementsMustBeSafe, x::EXPR)
567+
function check(t::LogStatementsMustBeSafe, x::EXPR, markers::Dict{Symbol,String})
568+
if haskey(markers, :filename)
569+
# Must have "src/" in the file name, else we just
570+
contains(markers[:filename], "test/") && return
571+
end
572+
568573
error_msg = "Unsafe logging statement. You must enclose variables and strings with `@safe(...)`."
569574

570575
# @info and its friends

0 commit comments

Comments
 (0)