summaryrefslogtreecommitdiff
path: root/nix/dev/checks.nix
blob: 1d65625bcd79a06c6f255159c3f8c28374186157 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  perSystem = {
    lib,
    pkgs,
    ...
  }: {
    checks = {
      actionlint = pkgs.runCommand "check-actionlint" {} ''
        ${lib.getExe pkgs.actionlint} ${../../.github/workflows}/*
        touch $out
      '';

      editorconfig = pkgs.runCommand "check-editorconfig" {} ''
        cd ${../../.}
        ${lib.getExe pkgs.editorconfig-checker} \
          -exclude '.git' .

        touch $out
      '';

      statix = pkgs.runCommand "check-statix" {} ''
        ${lib.getExe pkgs.statix} check ${../../.}
        touch $out
      '';
    };
  };
}