From 96a404acfcd628bc23279df1d95698c111b22a02 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 4 Nov 2021 22:00:13 +0530 Subject: add missing explanation to deprecated_is_null --- lib/src/lints/deprecated_is_null.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/src/lints') diff --git a/lib/src/lints/deprecated_is_null.rs b/lib/src/lints/deprecated_is_null.rs index 99fb3fb..fce6931 100644 --- a/lib/src/lints/deprecated_is_null.rs +++ b/lib/src/lints/deprecated_is_null.rs @@ -7,6 +7,25 @@ use rnix::{ NodeOrToken, SyntaxElement, SyntaxKind, }; +/// ## What it does +/// Checks for usage of the `isNull` function. +/// +/// ## Why is this bad? +/// `isNull` is deprecated. +/// +/// ## Example +/// +/// Instead of `isNull` for `null` checks, +/// +/// ```nix +/// isNull e +/// ``` +/// +/// use the equality operator: +/// +/// ```nix +/// e == null +/// ``` #[lint( name = "deprecated isNull", note = "Found usage of deprecated builtin isNull", -- cgit v1.2.3