fix all statix warnings and re-enable statix pre-commit

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
2024-05-21 19:43:57 -04:00
committed by Richie Cahill
parent 0e090cb76a
commit 1b65b78d13
17 changed files with 181 additions and 163 deletions

View File

@ -5,6 +5,6 @@ let
getCfg = _: cfg: cfg.config.system.build.toplevel;
in
{
inherit (outputs) formatter devShells;
hosts = mapAttrs getCfg outputs.nixosConfigurations;
formatter = outputs.formatter;
}

View File

@ -55,11 +55,11 @@ let
jobOfRef =
name:
{ ref, ... }:
if isNull (builtins.match "^refs/heads/(.*)$" ref) then
if ((builtins.match "^refs/heads/(.*)$" ref) == null) then
null
else
{
name = (builtins.replaceStrings [ "/" ] [ "-" ] "branch-${name}");
name = builtins.replaceStrings [ "/" ] [ "-" ] "branch-${name}";
value = makeJob {
description = "Branch ${name}";
flake = "git+ssh://git@github.com/${repo}?ref=${ref}";
@ -81,7 +81,7 @@ let
# wrapper function for reading json from file
readJSONFile = f: builtins.fromJSON (builtins.readFile f);
# remove null values from a set, in-case of branches that don't exist
mapFilter = f: l: builtins.filter (x: !(isNull x)) (map f l);
mapFilter = f: l: builtins.filter (x: (x != null)) (map f l);
# Create job set from PRs and branches
jobs = makeSpec (