diff options
Diffstat (limited to 'lib/src/lints/deprecated_is_null.rs')
-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", |