From 78dda5ec5a637b7756ae17d69ff90cf5de210404 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 31 Oct 2021 20:45:57 -0400 Subject: fix tests --- lib/src/lints/bool_comparison.rs | 4 ++-- lib/src/lints/collapsible_let_in.rs | 4 ++-- lib/src/lints/empty_let_in.rs | 4 ++-- lib/src/lints/empty_pattern.rs | 4 ++-- lib/src/lints/eta_reduction.rs | 4 ++-- lib/src/lints/legacy_let_syntax.rs | 4 ++-- lib/src/lints/manual_inherit.rs | 4 ++-- lib/src/lints/manual_inherit_from.rs | 4 ++-- lib/src/lints/redundant_pattern_bind.rs | 4 ++-- lib/src/lints/unquoted_splice.rs | 4 ++-- lib/src/lints/useless_parens.rs | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) (limited to 'lib/src') 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::{ /// ## Example /// Instead of checking the value of `x`: /// -/// ``` +/// ```nix /// if x == true then 0 else 1 /// ``` /// /// Use `x` directly: /// -/// ``` +/// ```nix /// if x then 0 else 1 /// ``` #[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; /// /// ## Example /// -/// ``` +/// ```nix /// let /// a = 2; /// in @@ -29,7 +29,7 @@ use rowan::Direction; /// /// Merge both `let-in` expressions: /// -/// ``` +/// ```nix /// let /// a = 2; /// 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::{ /// /// ## Example /// -/// ``` +/// ```nix /// let in pkgs.statix /// ``` /// /// Preserve only the body of the `let-in` expression: /// -/// ``` +/// ```nix /// pkgs.statix /// ``` #[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::{ /// /// ## Example /// -/// ``` +/// ```nix /// client = { ... }: { /// imports = [ self.nixosModules.irmaseal-pkg ]; /// services.irmaseal-pkg.enable = true; @@ -28,7 +28,7 @@ use rnix::{ /// Replace the empty variadic pattern with `_` to indicate that you /// intend to ignore the argument: /// -/// ``` +/// ```nix /// client = _: { /// imports = [ self.nixosModules.irmaseal-pkg ]; /// 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::{ /// /// ## Example /// -/// ``` +/// ```nix /// let /// double = i: 2 * i; /// in @@ -27,7 +27,7 @@ use rnix::{ /// The lambda passed to the `map` function is eta-reducible, and the /// result reads more naturally: /// -/// ``` +/// ```nix /// let /// double = i: 2 * i; /// 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::{ /// /// Legacy let syntax makes use of an attribute set annotated with /// `let` and expects a `body` attribute. -/// ``` +/// ```nix /// let { /// body = x + y; /// x = 2; @@ -28,7 +28,7 @@ use rnix::{ /// This is trivially representible via `rec`, which is documented /// and more widely known: /// -/// ``` +/// ```nix /// rec { /// body = x + y; /// 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::{ /// /// ## Example /// -/// ``` +/// ```nix /// let /// a = 2; /// in @@ -25,7 +25,7 @@ use rnix::{ /// /// Try `inherit` instead: /// -/// ``` +/// ```nix /// let /// a = 2; /// 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::{ /// /// ## Example /// -/// ``` +/// ```nix /// let /// mtl = pkgs.haskellPackages.mtl; /// in @@ -25,7 +25,7 @@ use rnix::{ /// /// Try `inherit` instead: /// -/// ``` +/// ```nix /// let /// inherit (pkgs.haskellPackages) mtl; /// 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::{ /// /// ## Example /// -/// ``` +/// ```nix /// inputs @ { ... }: inputs.nixpkgs /// ``` /// /// Remove the pattern altogether: /// -/// ``` +/// ```nix /// inputs: inputs.nixpkgs /// ``` #[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::{ /// /// ## Example /// -/// ``` +/// ```nix /// let /// pkgs = nixpkgs.legacyPackages.${system}; /// in @@ -25,7 +25,7 @@ use rnix::{ /// /// Quote the splice expression: /// -/// ``` +/// ```nix /// let /// pkgs = nixpkgs.legacyPackages."${system}"; /// 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::{ /// /// ## Example /// -/// ``` +/// ```nix /// let /// double = (x: 2 * x); /// ls = map (double) [ 1 2 3 ]; @@ -25,7 +25,7 @@ use rnix::{ /// /// Remove unnecessary parentheses: /// -/// ``` +/// ```nix /// let /// double = x: 2 * x; /// ls = map double [ 1 2 3 ]; -- cgit v1.2.3