From 4db439c5991dc1903efc167918b64cf852ba0fd5 Mon Sep 17 00:00:00 2001 From: Artturin Date: Mon, 16 Jan 2023 00:19:32 +0200 Subject: [PATCH] stdenv: disable shellcheck rules In pkgs/stdenv/generic/setup.sh line 101: source "$hookName" ^---------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location. In pkgs/stdenv/generic/setup.sh line 166: mkdir -p "$out/nix-support" ^--^ SC2154 (warning): out is referenced but not assigned. In pkgs/stdenv/generic/setup.sh line 407: PATH= ^--^ SC2123 (warning): PATH is the shell search path. Use another name. In pkgs/stdenv/generic/setup.sh line 452: declare -a pkgBuildAccumVars=(pkgsBuildBuild pkgsBuildHost pkgsBuildTarget) ^---------------^ SC2034 (warning): pkgBuildAccumVars appears unused. Verify use (or export if used e xternally). because pkgBuildAccumVars is used In pkgs/stdenv/generic/setup.sh line 235: nameref="$* ${nameref-}" ^-----^ SC2178 (warning): Variable was used as an array but is now assigned a string. because we theres a useArray conditional --- pkgs/stdenv/generic/setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index af8c190f8534..89a0dc1112d8 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1,4 +1,5 @@ # shellcheck shell=bash +# shellcheck disable=1090,2154,2123,2034,2178 __nixpkgs_setup_set_original=$- set -eu set -o pipefail @@ -443,7 +444,6 @@ runHook addInputsHook # Package accumulators -# shellcheck disable=SC2034 declare -a pkgsBuildBuild pkgsBuildHost pkgsBuildTarget declare -a pkgsHostHost pkgsHostTarget declare -a pkgsTargetTarget @@ -468,7 +468,6 @@ declare -a pkgTargetHookVars=(envTargetTargetHook) declare -a pkgHookVarVars=(pkgBuildHookVars pkgHostHookVars pkgTargetHookVars) # those variables are declared here, since where and if they are used varies -# shellcheck disable=SC2034 declare -a preFixupHooks fixupOutputHooks preConfigureHooks postFixupHooks postUnpackHooks unpackCmdHooks # Add env hooks for all sorts of deps with the specified host offset.