Skip to content

Commit 81db96e

Browse files
committed
recommend isnothing for comparing against nothing
It's been in Base since Julia 1.1
1 parent 6235a53 commit 81db96e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/linting/checks.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
const LintCodeDescriptions = Dict{LintCodes,String}(
3737
IncorrectCallArgs => "Possible method call error.",
3838
IncorrectIterSpec => "A loop iterator has been used that will likely error.",
39-
NothingEquality => "Compare against `nothing` using `===`",
40-
NothingNotEq => "Compare against `nothing` using `!==`",
39+
NothingEquality => "Compare against `nothing` using `isnothing`",
40+
NothingNotEq => "Compare against `nothing` using `!isnothing`",
4141
ConstIfCondition => "A boolean literal has been used as the conditional of an if statement - it will either always or never run.",
4242
EqInIfConditional => "Unbracketed assignment in if conditional statements is not allowed, did you mean to use ==?",
4343
PointlessOR => "The first argument of a `||` call is a boolean literal.",

0 commit comments

Comments
 (0)