diff options
author | Alyssa Ross <alyssa.ross@unikie.com> | 2022-11-18 10:09:47 +0000 |
---|---|---|
committer | Alyssa Ross <alyssa.ross@unikie.com> | 2022-11-18 13:35:42 +0000 |
commit | e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc (patch) | |
tree | 56b2086f7976afc8d36b557a13fd4651d3be47af | |
parent | 9f3671abc5512e8d625d92957d3b2d0d4c2ae8b7 (diff) | |
download | spectrum-e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc.tar spectrum-e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc.tar.gz spectrum-e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc.tar.bz2 spectrum-e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc.tar.lz spectrum-e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc.tar.xz spectrum-e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc.tar.zst spectrum-e2cdde0af4cebd13ceacf4ce7ce70e689bbe9dbc.zip |
nix/checks.nix: shellcheck more files
I didn't realise that bash's ** feature (which matches any depth of directories) wasn't enabled by default, because it appeared to work, just didn't find all scripts. Signed-off-by: Alyssa Ross <alyssa.ross@unikie.com> Fixes: 169fdd6 ("release.nix: run shellcheck on build scripts") Message-Id: <20221118100947.33597-2-alyssa.ross@unikie.com> Reviewed-by: Henri Rosten <henri.rosten@unikie.com>
-rw-r--r-- | nix/checks.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nix/checks.nix b/nix/checks.nix index 9eb261f..9ffdc0a 100644 --- a/nix/checks.nix +++ b/nix/checks.nix @@ -11,12 +11,14 @@ runCommand "spectrum-shellcheck" { src = lib.cleanSourceWith { filter = path: type: - type == "directory" || builtins.match ''.*[^/]\.sh'' path != null; + (builtins.baseNameOf path != "build" && type == "directory") + || builtins.match ''.*[^/]\.sh'' path != null; src = lib.cleanSource ../.; }; nativeBuildInputs = [ shellcheck ]; } '' + shopt -s globstar shellcheck $src/**/*.sh touch $out '' |