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