diff options
author | Akshay <[email protected]> | 2021-11-04 16:30:13 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2021-11-04 16:30:13 +0000 |
commit | 96a404acfcd628bc23279df1d95698c111b22a02 (patch) | |
tree | a1d6134032eb89d926f6305c83be788280678ca7 | |
parent | b99dbc25294248247460ac0d71724f77a934fe63 (diff) |
add missing explanation to deprecated_is_null
-rw-r--r-- | lib/src/lints/deprecated_is_null.rs | 19 |
1 files changed, 19 insertions, 0 deletions
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::{ | |||
7 | NodeOrToken, SyntaxElement, SyntaxKind, | 7 | NodeOrToken, SyntaxElement, SyntaxKind, |
8 | }; | 8 | }; |
9 | 9 | ||
10 | /// ## What it does | ||
11 | /// Checks for usage of the `isNull` function. | ||
12 | /// | ||
13 | /// ## Why is this bad? | ||
14 | /// `isNull` is deprecated. | ||
15 | /// | ||
16 | /// ## Example | ||
17 | /// | ||
18 | /// Instead of `isNull` for `null` checks, | ||
19 | /// | ||
20 | /// ```nix | ||
21 | /// isNull e | ||
22 | /// ``` | ||
23 | /// | ||
24 | /// use the equality operator: | ||
25 | /// | ||
26 | /// ```nix | ||
27 | /// e == null | ||
28 | /// ``` | ||
10 | #[lint( | 29 | #[lint( |
11 | name = "deprecated isNull", | 30 | name = "deprecated isNull", |
12 | note = "Found usage of deprecated builtin isNull", | 31 | note = "Found usage of deprecated builtin isNull", |