From: Alyssa Ross <alyssa.ross@unikie.com>
To: devel@spectrum-os.org
Cc: Henri Rosten <henri.rosten@unikie.com>
Subject: [PATCH v2 2/2] nix/checks.nix: shellcheck more files
Date: Fri, 18 Nov 2022 10:09:47 +0000 [thread overview]
Message-ID: <20221118100947.33597-2-alyssa.ross@unikie.com> (raw)
In-Reply-To: <20221118100947.33597-1-alyssa.ross@unikie.com>
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")
---
v2: exclude build directories
nix/checks.nix | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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
''
--
2.35.1
next prev parent reply other threads:[~2022-11-18 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 10:09 [PATCH v2 1/2] Documentation/scripts: fix shellcheck issues Alyssa Ross
2022-11-18 10:09 ` Alyssa Ross [this message]
2022-11-18 11:00 ` [PATCH v2 2/2] nix/checks.nix: shellcheck more files Henri Rosten
2022-11-18 16:38 ` Alyssa Ross
2022-11-18 16:38 ` [PATCH v2 1/2] Documentation/scripts: fix shellcheck issues Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221118100947.33597-2-alyssa.ross@unikie.com \
--to=alyssa.ross@unikie.com \
--cc=devel@spectrum-os.org \
--cc=henri.rosten@unikie.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).