From 81db96e22e53fd68fe07d5e29182c27064980948 Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Sun, 11 Sep 2022 00:27:23 +0200 Subject: [PATCH] recommend isnothing for comparing against nothing It's been in Base since Julia 1.1 --- src/linting/checks.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/linting/checks.jl b/src/linting/checks.jl index 914123a2..21de6a35 100644 --- a/src/linting/checks.jl +++ b/src/linting/checks.jl @@ -36,8 +36,8 @@ const LintCodeDescriptions = Dict{LintCodes,String}( IncorrectCallArgs => "Possible method call error.", IncorrectIterSpec => "A loop iterator has been used that will likely error.", - NothingEquality => "Compare against `nothing` using `===`", - NothingNotEq => "Compare against `nothing` using `!==`", + NothingEquality => "Compare against `nothing` using `isnothing`", + NothingNotEq => "Compare against `nothing` using `!isnothing`", ConstIfCondition => "A boolean literal has been used as the conditional of an if statement - it will either always or never run.", EqInIfConditional => "Unbracketed assignment in if conditional statements is not allowed, did you mean to use ==?", PointlessOR => "The first argument of a `||` call is a boolean literal.",