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
This commit is contained in:
Artturin 2023-01-16 00:19:32 +02:00
parent 0417f953e2
commit 4db439c599

View file

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