mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 15:29:07 +01:00
checks: Add formatting, statix and deadnix checks
This commit is contained in:
parent
71132b3c94
commit
3ecc10c445
5 changed files with 95 additions and 10 deletions
20
flake-parts/checks.nix
Normal file
20
flake-parts/checks.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ inputs, self, ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ inputs', pkgs, ... }:
|
||||
{
|
||||
checks = {
|
||||
formatting = (inputs.treefmt.lib.evalModule pkgs "${self}/treefmt.nix").config.build.check self;
|
||||
|
||||
statix = pkgs.runCommand "statix" { buildInputs = [ inputs'.statix.packages.statix ]; } ''
|
||||
statix check ${self}
|
||||
touch $out
|
||||
'';
|
||||
|
||||
deadnix = pkgs.runCommand "deadnix" { buildInputs = [ pkgs.deadnix ]; } ''
|
||||
deadnix --fail ${self}
|
||||
touch $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue