aboutsummaryrefslogtreecommitdiff
path: root/lib/src/lints/empty_let_in.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-10-31 16:01:04 +0000
committerAkshay <[email protected]>2021-10-31 16:01:04 +0000
commit15ccd864c8869f87a564e5ab7e923dcc2bb54340 (patch)
tree9d47b230d5d4ad1b0f40ba88f097418b981805a4 /lib/src/lints/empty_let_in.rs
parent4567a246a0b63418f17ead4adc81f5ebab8bdd81 (diff)
add explainations to each lint
Diffstat (limited to 'lib/src/lints/empty_let_in.rs')
-rw-r--r--lib/src/lints/empty_let_in.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/src/lints/empty_let_in.rs b/lib/src/lints/empty_let_in.rs
index 4e0887d..b255c23 100644
--- a/lib/src/lints/empty_let_in.rs
+++ b/lib/src/lints/empty_let_in.rs
@@ -7,7 +7,24 @@ use rnix::{
7 NodeOrToken, SyntaxElement, SyntaxKind, 7 NodeOrToken, SyntaxElement, SyntaxKind,
8}; 8};
9 9
10/// empty let-in found 10/// ## What it does
11/// Checks for `let-in` expressions which create no new bindings.
12///
13/// ## Why is this bad?
14/// `let-in` expressions that create no new bindings are useless.
15/// These are probably remnants from debugging or editing expressions.
16///
17/// ## Example
18///
19/// ```
20/// let in pkgs.statix
21/// ```
22///
23/// Preserve only the body of the `let-in` expression:
24///
25/// ```
26/// pkgs.statix
27/// ```
11#[lint( 28#[lint(
12 name = "empty let-in", 29 name = "empty let-in",
13 note = "Useless let-in expression", 30 note = "Useless let-in expression",