diff options
author | figsoda <[email protected]> | 2021-11-01 00:45:57 +0000 |
---|---|---|
committer | figsoda <[email protected]> | 2021-11-01 00:45:57 +0000 |
commit | 78dda5ec5a637b7756ae17d69ff90cf5de210404 (patch) | |
tree | 66e2ddbf63f214d9410cd08530a7aac7f2ea1d95 /lib | |
parent | 150106459f7a8e0325fe85c41919cc32f2f19964 (diff) |
fix tests
Diffstat (limited to 'lib')
-rw-r--r-- | lib/src/lints/bool_comparison.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/collapsible_let_in.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/empty_let_in.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/empty_pattern.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/eta_reduction.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/legacy_let_syntax.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/manual_inherit.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/manual_inherit_from.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/redundant_pattern_bind.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/unquoted_splice.rs | 4 | ||||
-rw-r--r-- | lib/src/lints/useless_parens.rs | 4 |
11 files changed, 22 insertions, 22 deletions
diff --git a/lib/src/lints/bool_comparison.rs b/lib/src/lints/bool_comparison.rs index 5c9bee8..ed1e8bb 100644 --- a/lib/src/lints/bool_comparison.rs +++ b/lib/src/lints/bool_comparison.rs | |||
@@ -17,13 +17,13 @@ use rnix::{ | |||
17 | /// ## Example | 17 | /// ## Example |
18 | /// Instead of checking the value of `x`: | 18 | /// Instead of checking the value of `x`: |
19 | /// | 19 | /// |
20 | /// ``` | 20 | /// ```nix |
21 | /// if x == true then 0 else 1 | 21 | /// if x == true then 0 else 1 |
22 | /// ``` | 22 | /// ``` |
23 | /// | 23 | /// |
24 | /// Use `x` directly: | 24 | /// Use `x` directly: |
25 | /// | 25 | /// |
26 | /// ``` | 26 | /// ```nix |
27 | /// if x then 0 else 1 | 27 | /// if x then 0 else 1 |
28 | /// ``` | 28 | /// ``` |
29 | #[lint( | 29 | #[lint( |
diff --git a/lib/src/lints/collapsible_let_in.rs b/lib/src/lints/collapsible_let_in.rs index 21199a8..26a3102 100644 --- a/lib/src/lints/collapsible_let_in.rs +++ b/lib/src/lints/collapsible_let_in.rs | |||
@@ -17,7 +17,7 @@ use rowan::Direction; | |||
17 | /// | 17 | /// |
18 | /// ## Example | 18 | /// ## Example |
19 | /// | 19 | /// |
20 | /// ``` | 20 | /// ```nix |
21 | /// let | 21 | /// let |
22 | /// a = 2; | 22 | /// a = 2; |
23 | /// in | 23 | /// in |
@@ -29,7 +29,7 @@ use rowan::Direction; | |||
29 | /// | 29 | /// |
30 | /// Merge both `let-in` expressions: | 30 | /// Merge both `let-in` expressions: |
31 | /// | 31 | /// |
32 | /// ``` | 32 | /// ```nix |
33 | /// let | 33 | /// let |
34 | /// a = 2; | 34 | /// a = 2; |
35 | /// b = 3; | 35 | /// b = 3; |
diff --git a/lib/src/lints/empty_let_in.rs b/lib/src/lints/empty_let_in.rs index b255c23..5a51ea3 100644 --- a/lib/src/lints/empty_let_in.rs +++ b/lib/src/lints/empty_let_in.rs | |||
@@ -16,13 +16,13 @@ use rnix::{ | |||
16 | /// | 16 | /// |
17 | /// ## Example | 17 | /// ## Example |
18 | /// | 18 | /// |
19 | /// ``` | 19 | /// ```nix |
20 | /// let in pkgs.statix | 20 | /// let in pkgs.statix |
21 | /// ``` | 21 | /// ``` |
22 | /// | 22 | /// |
23 | /// Preserve only the body of the `let-in` expression: | 23 | /// Preserve only the body of the `let-in` expression: |
24 | /// | 24 | /// |
25 | /// ``` | 25 | /// ```nix |
26 | /// pkgs.statix | 26 | /// pkgs.statix |
27 | /// ``` | 27 | /// ``` |
28 | #[lint( | 28 | #[lint( |
diff --git a/lib/src/lints/empty_pattern.rs b/lib/src/lints/empty_pattern.rs index 5312548..c0cb5a4 100644 --- a/lib/src/lints/empty_pattern.rs +++ b/lib/src/lints/empty_pattern.rs | |||
@@ -18,7 +18,7 @@ use rnix::{ | |||
18 | /// | 18 | /// |
19 | /// ## Example | 19 | /// ## Example |
20 | /// | 20 | /// |
21 | /// ``` | 21 | /// ```nix |
22 | /// client = { ... }: { | 22 | /// client = { ... }: { |
23 | /// imports = [ self.nixosModules.irmaseal-pkg ]; | 23 | /// imports = [ self.nixosModules.irmaseal-pkg ]; |
24 | /// services.irmaseal-pkg.enable = true; | 24 | /// services.irmaseal-pkg.enable = true; |
@@ -28,7 +28,7 @@ use rnix::{ | |||
28 | /// Replace the empty variadic pattern with `_` to indicate that you | 28 | /// Replace the empty variadic pattern with `_` to indicate that you |
29 | /// intend to ignore the argument: | 29 | /// intend to ignore the argument: |
30 | /// | 30 | /// |
31 | /// ``` | 31 | /// ```nix |
32 | /// client = _: { | 32 | /// client = _: { |
33 | /// imports = [ self.nixosModules.irmaseal-pkg ]; | 33 | /// imports = [ self.nixosModules.irmaseal-pkg ]; |
34 | /// services.irmaseal-pkg.enable = true; | 34 | /// services.irmaseal-pkg.enable = true; |
diff --git a/lib/src/lints/eta_reduction.rs b/lib/src/lints/eta_reduction.rs index 3a483d0..9df3f1e 100644 --- a/lib/src/lints/eta_reduction.rs +++ b/lib/src/lints/eta_reduction.rs | |||
@@ -17,7 +17,7 @@ use rnix::{ | |||
17 | /// | 17 | /// |
18 | /// ## Example | 18 | /// ## Example |
19 | /// | 19 | /// |
20 | /// ``` | 20 | /// ```nix |
21 | /// let | 21 | /// let |
22 | /// double = i: 2 * i; | 22 | /// double = i: 2 * i; |
23 | /// in | 23 | /// in |
@@ -27,7 +27,7 @@ use rnix::{ | |||
27 | /// The lambda passed to the `map` function is eta-reducible, and the | 27 | /// The lambda passed to the `map` function is eta-reducible, and the |
28 | /// result reads more naturally: | 28 | /// result reads more naturally: |
29 | /// | 29 | /// |
30 | /// ``` | 30 | /// ```nix |
31 | /// let | 31 | /// let |
32 | /// double = i: 2 * i; | 32 | /// double = i: 2 * i; |
33 | /// in | 33 | /// in |
diff --git a/lib/src/lints/legacy_let_syntax.rs b/lib/src/lints/legacy_let_syntax.rs index 139f633..cdd012d 100644 --- a/lib/src/lints/legacy_let_syntax.rs +++ b/lib/src/lints/legacy_let_syntax.rs | |||
@@ -17,7 +17,7 @@ use rnix::{ | |||
17 | /// | 17 | /// |
18 | /// Legacy let syntax makes use of an attribute set annotated with | 18 | /// Legacy let syntax makes use of an attribute set annotated with |
19 | /// `let` and expects a `body` attribute. | 19 | /// `let` and expects a `body` attribute. |
20 | /// ``` | 20 | /// ```nix |
21 | /// let { | 21 | /// let { |
22 | /// body = x + y; | 22 | /// body = x + y; |
23 | /// x = 2; | 23 | /// x = 2; |
@@ -28,7 +28,7 @@ use rnix::{ | |||
28 | /// This is trivially representible via `rec`, which is documented | 28 | /// This is trivially representible via `rec`, which is documented |
29 | /// and more widely known: | 29 | /// and more widely known: |
30 | /// | 30 | /// |
31 | /// ``` | 31 | /// ```nix |
32 | /// rec { | 32 | /// rec { |
33 | /// body = x + y; | 33 | /// body = x + y; |
34 | /// x = 2; | 34 | /// x = 2; |
diff --git a/lib/src/lints/manual_inherit.rs b/lib/src/lints/manual_inherit.rs index 2d119c3..1813af3 100644 --- a/lib/src/lints/manual_inherit.rs +++ b/lib/src/lints/manual_inherit.rs | |||
@@ -16,7 +16,7 @@ use rnix::{ | |||
16 | /// | 16 | /// |
17 | /// ## Example | 17 | /// ## Example |
18 | /// | 18 | /// |
19 | /// ``` | 19 | /// ```nix |
20 | /// let | 20 | /// let |
21 | /// a = 2; | 21 | /// a = 2; |
22 | /// in | 22 | /// in |
@@ -25,7 +25,7 @@ use rnix::{ | |||
25 | /// | 25 | /// |
26 | /// Try `inherit` instead: | 26 | /// Try `inherit` instead: |
27 | /// | 27 | /// |
28 | /// ``` | 28 | /// ```nix |
29 | /// let | 29 | /// let |
30 | /// a = 2; | 30 | /// a = 2; |
31 | /// in | 31 | /// in |
diff --git a/lib/src/lints/manual_inherit_from.rs b/lib/src/lints/manual_inherit_from.rs index 8d0f539..ab2579d 100644 --- a/lib/src/lints/manual_inherit_from.rs +++ b/lib/src/lints/manual_inherit_from.rs | |||
@@ -16,7 +16,7 @@ use rnix::{ | |||
16 | /// | 16 | /// |
17 | /// ## Example | 17 | /// ## Example |
18 | /// | 18 | /// |
19 | /// ``` | 19 | /// ```nix |
20 | /// let | 20 | /// let |
21 | /// mtl = pkgs.haskellPackages.mtl; | 21 | /// mtl = pkgs.haskellPackages.mtl; |
22 | /// in | 22 | /// in |
@@ -25,7 +25,7 @@ use rnix::{ | |||
25 | /// | 25 | /// |
26 | /// Try `inherit` instead: | 26 | /// Try `inherit` instead: |
27 | /// | 27 | /// |
28 | /// ``` | 28 | /// ```nix |
29 | /// let | 29 | /// let |
30 | /// inherit (pkgs.haskellPackages) mtl; | 30 | /// inherit (pkgs.haskellPackages) mtl; |
31 | /// in | 31 | /// in |
diff --git a/lib/src/lints/redundant_pattern_bind.rs b/lib/src/lints/redundant_pattern_bind.rs index 5b0711f..882a660 100644 --- a/lib/src/lints/redundant_pattern_bind.rs +++ b/lib/src/lints/redundant_pattern_bind.rs | |||
@@ -17,13 +17,13 @@ use rnix::{ | |||
17 | /// | 17 | /// |
18 | /// ## Example | 18 | /// ## Example |
19 | /// | 19 | /// |
20 | /// ``` | 20 | /// ```nix |
21 | /// inputs @ { ... }: inputs.nixpkgs | 21 | /// inputs @ { ... }: inputs.nixpkgs |
22 | /// ``` | 22 | /// ``` |
23 | /// | 23 | /// |
24 | /// Remove the pattern altogether: | 24 | /// Remove the pattern altogether: |
25 | /// | 25 | /// |
26 | /// ``` | 26 | /// ```nix |
27 | /// inputs: inputs.nixpkgs | 27 | /// inputs: inputs.nixpkgs |
28 | /// ``` | 28 | /// ``` |
29 | #[lint( | 29 | #[lint( |
diff --git a/lib/src/lints/unquoted_splice.rs b/lib/src/lints/unquoted_splice.rs index c2fd6e4..4700d31 100644 --- a/lib/src/lints/unquoted_splice.rs +++ b/lib/src/lints/unquoted_splice.rs | |||
@@ -16,7 +16,7 @@ use rnix::{ | |||
16 | /// | 16 | /// |
17 | /// ## Example | 17 | /// ## Example |
18 | /// | 18 | /// |
19 | /// ``` | 19 | /// ```nix |
20 | /// let | 20 | /// let |
21 | /// pkgs = nixpkgs.legacyPackages.${system}; | 21 | /// pkgs = nixpkgs.legacyPackages.${system}; |
22 | /// in | 22 | /// in |
@@ -25,7 +25,7 @@ use rnix::{ | |||
25 | /// | 25 | /// |
26 | /// Quote the splice expression: | 26 | /// Quote the splice expression: |
27 | /// | 27 | /// |
28 | /// ``` | 28 | /// ```nix |
29 | /// let | 29 | /// let |
30 | /// pkgs = nixpkgs.legacyPackages."${system}"; | 30 | /// pkgs = nixpkgs.legacyPackages."${system}"; |
31 | /// in | 31 | /// in |
diff --git a/lib/src/lints/useless_parens.rs b/lib/src/lints/useless_parens.rs index 36ad1b7..45d80ae 100644 --- a/lib/src/lints/useless_parens.rs +++ b/lib/src/lints/useless_parens.rs | |||
@@ -15,7 +15,7 @@ use rnix::{ | |||
15 | /// | 15 | /// |
16 | /// ## Example | 16 | /// ## Example |
17 | /// | 17 | /// |
18 | /// ``` | 18 | /// ```nix |
19 | /// let | 19 | /// let |
20 | /// double = (x: 2 * x); | 20 | /// double = (x: 2 * x); |
21 | /// ls = map (double) [ 1 2 3 ]; | 21 | /// ls = map (double) [ 1 2 3 ]; |
@@ -25,7 +25,7 @@ use rnix::{ | |||
25 | /// | 25 | /// |
26 | /// Remove unnecessary parentheses: | 26 | /// Remove unnecessary parentheses: |
27 | /// | 27 | /// |
28 | /// ``` | 28 | /// ```nix |
29 | /// let | 29 | /// let |
30 | /// double = x: 2 * x; | 30 | /// double = x: 2 * x; |
31 | /// ls = map double [ 1 2 3 ]; | 31 | /// ls = map double [ 1 2 3 ]; |