diff options
| author | seth <[email protected]> | 2024-07-16 19:04:27 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-07-16 22:24:21 -0400 |
| commit | 2e7e1ce219b43bb74f67875200dd4b68758ffd27 (patch) | |
| tree | 11ca91f55aa47c5b341aaf65f3626c9681a22b07 /dev/checks.nix | |
| parent | 255e7c40af44aeedf19a3ca682cfc8a098266e8a (diff) | |
back to nixvim againnixvim-again
Diffstat (limited to 'dev/checks.nix')
| -rw-r--r-- | dev/checks.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dev/checks.nix b/dev/checks.nix new file mode 100644 index 0000000..533c2a0 --- /dev/null +++ b/dev/checks.nix @@ -0,0 +1,45 @@ +{ + perSystem = + { lib, pkgs, ... }: + let + root = lib.fileset.toSource { + root = ../.; + fileset = lib.fileset.unions [ + ./. + ../.github + ../nixvim + ../flake.nix + ]; + }; + in + { + checks = { + format-and-lint = + pkgs.runCommand "format-and-lint" + { + src = root; + nativeBuildInputs = [ + pkgs.actionlint + pkgs.deadnix + pkgs.nixfmt-rfc-style + pkgs.statix + ]; + } + '' + echo "running actionlint..." + actionlint ./.github/workflows/* + + echo "running deadnix..." + deadnix + + echo "running nixfmt..." + nixfmt --check . + + echo "running statix..." + statix check . + + touch $out + ''; + }; + }; +} |
