feat(nix): add style fix app
This commit is contained in:
@@ -2,25 +2,26 @@
|
|||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
formatter,
|
formatter,
|
||||||
self,
|
|
||||||
system,
|
system,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
style-check = {
|
fix = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = lib.getExe (pkgs.writeShellApplication {
|
program = lib.getExe (pkgs.writeShellApplication {
|
||||||
name = "style-check";
|
name = "fix";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
|
formatter.config.build.wrapper
|
||||||
pkgs.statix
|
pkgs.statix
|
||||||
pkgs.deadnix
|
pkgs.deadnix
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
test -e ${formatter.config.build.check self}
|
treefmt
|
||||||
statix check .
|
statix fix .
|
||||||
deadnix --fail --no-lambda-pattern-names --no-underscore .
|
deadnix --edit --no-lambda-pattern-names --no-underscore .
|
||||||
|
treefmt
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ in
|
|||||||
inputs
|
inputs
|
||||||
lib
|
lib
|
||||||
formatter
|
formatter
|
||||||
self
|
|
||||||
system
|
system
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user