patches and low-level development discussion
 help / color / mirror / code / Atom feed
From: Henri Rosten <henri.rosten@unikie.com>
To: Alyssa Ross <alyssa.ross@unikie.com>
Cc: devel@spectrum-os.org
Subject: Re: [PATCH v2 2/2] nix/checks.nix: shellcheck more files
Date: Fri, 18 Nov 2022 13:00:41 +0200	[thread overview]
Message-ID: <20221118110041.GA1571066@buamix> (raw)
In-Reply-To: <20221118100947.33597-2-alyssa.ross@unikie.com>

On Fri, Nov 18, 2022 at 10:09:47AM +0000, Alyssa Ross wrote:
> 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

Thanks for fixing this.

Reviewed-by: Henri Rosten <henri.rosten@unikie.com>

> 
>  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
> 


  reply	other threads:[~2022-11-18 11:00 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 ` [PATCH v2 2/2] nix/checks.nix: shellcheck more files Alyssa Ross
2022-11-18 11:00   ` Henri Rosten [this message]
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=20221118110041.GA1571066@buamix \
    --to=henri.rosten@unikie.com \
    --cc=alyssa.ross@unikie.com \
    --cc=devel@spectrum-os.org \
    /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).