aboutsummaryrefslogtreecommitdiff
path: root/lib/src/lints/unquoted_splice.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/lints/unquoted_splice.rs')
-rw-r--r--lib/src/lints/unquoted_splice.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/src/lints/unquoted_splice.rs b/lib/src/lints/unquoted_splice.rs
index 2831c1b..c2fd6e4 100644
--- a/lib/src/lints/unquoted_splice.rs
+++ b/lib/src/lints/unquoted_splice.rs
@@ -7,6 +7,30 @@ use rnix::{
7 NodeOrToken, SyntaxElement, SyntaxKind, 7 NodeOrToken, SyntaxElement, SyntaxKind,
8}; 8};
9 9
10/// ## What it does
11/// Checks for antiquote/splice expressions that are not quoted.
12///
13/// ## Why is this bad?
14/// An *anti*quoted expression should always occur within a *quoted*
15/// expression.
16///
17/// ## Example
18///
19/// ```
20/// let
21/// pkgs = nixpkgs.legacyPackages.${system};
22/// in
23/// pkgs
24/// ```
25///
26/// Quote the splice expression:
27///
28/// ```
29/// let
30/// pkgs = nixpkgs.legacyPackages."${system}";
31/// in
32/// pkgs
33/// ```
10#[lint( 34#[lint(
11 name = "unquoted splice", 35 name = "unquoted splice",
12 note = "Found unquoted splice expression", 36 note = "Found unquoted splice expression",