mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-02 00:55:54 +00:00
flake: use the correct formatter for Nix; suppress deno output
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ic39d3a2448cd4b4f241909779f7ead596a6a6964
This commit is contained in:
parent
8a1ef233eb
commit
797748a20c
1 changed files with 5 additions and 3 deletions
|
|
@ -71,10 +71,12 @@
|
||||||
|
|
||||||
text = ''
|
text = ''
|
||||||
# Find Nix files in the tree and format them with Alejandra
|
# Find Nix files in the tree and format them with Alejandra
|
||||||
fd "$@" -t f -e nix -x nixfmt -q '{}'
|
echo "Formatting Nix files"
|
||||||
|
fd "$@" -t f -e nix -x alejandra -q '{}'
|
||||||
|
|
||||||
# Same for Markdown files, but with deno
|
# Same for Markdown files, but with deno
|
||||||
fd "$@" -t f -e md -x deno fmt '{}'
|
echo "Formatting Markdown files"
|
||||||
|
fd "$@" -t f -e md -x deno fmt -q '{}'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -93,7 +95,7 @@
|
||||||
# This can be initiated with `nix build .#checks.<system>.md-fmt`
|
# This can be initiated with `nix build .#checks.<system>.md-fmt`
|
||||||
# or with `nix flake check`
|
# or with `nix flake check`
|
||||||
md-fmt = pkgs.runCommand "md-fmt-check" {nativeBuildInputs = [pkgs.deno];} ''
|
md-fmt = pkgs.runCommand "md-fmt-check" {nativeBuildInputs = [pkgs.deno];} ''
|
||||||
deno fmt --check ${self} --ext md < /dev/null
|
deno fmt --check ${self} --ext md
|
||||||
touch $out
|
touch $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue