mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
remove deprecated formatters
This commit is contained in:
parent
3eda27f1ca
commit
bd2255044c
1 changed files with 8 additions and 24 deletions
32
treefmt.nix
32
treefmt.nix
|
|
@ -1,9 +1,9 @@
|
||||||
{ lib, inputs, ... }: {
|
{ inputs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.treefmt-nix.flakeModule
|
inputs.treefmt-nix.flakeModule
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem = { pkgs, ... }: {
|
perSystem = _: {
|
||||||
treefmt = {
|
treefmt = {
|
||||||
# Used to find the project root
|
# Used to find the project root
|
||||||
projectRootFile = "flake.lock";
|
projectRootFile = "flake.lock";
|
||||||
|
|
@ -12,34 +12,18 @@
|
||||||
deadnix.enable = true;
|
deadnix.enable = true;
|
||||||
deno.enable = true;
|
deno.enable = true;
|
||||||
mypy.enable = true;
|
mypy.enable = true;
|
||||||
|
ruff.check = true;
|
||||||
|
ruff.format = true;
|
||||||
nixpkgs-fmt.enable = true;
|
nixpkgs-fmt.enable = true;
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
shfmt.enable = true;
|
shfmt.enable = true;
|
||||||
statix.enable = true;
|
statix.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
settings.formatter =
|
settings.formatter = {
|
||||||
let
|
shellcheck.includes = [ "*.sh" "direnvrc" ];
|
||||||
sh-includes = [ "*.sh" "direnvrc" ];
|
shfmt.includes = [ "*.sh" "direnvrc" ];
|
||||||
in
|
};
|
||||||
{
|
|
||||||
python = {
|
|
||||||
command = "sh";
|
|
||||||
options = [
|
|
||||||
"-eucx"
|
|
||||||
''
|
|
||||||
${lib.getExe pkgs.ruff} --fix "$@"
|
|
||||||
${lib.getExe pkgs.ruff} format "$@"
|
|
||||||
''
|
|
||||||
"--" # this argument is ignored by bash
|
|
||||||
];
|
|
||||||
includes = [ "*.py" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
shellcheck.includes = sh-includes;
|
|
||||||
|
|
||||||
shfmt.includes = sh-includes;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue