nixpkgs/nixos/modules/system/activation
Berk D. Demir e4bf5ce70d nixos/activation: Fix shellcheck test failure
lib/test.nix relies on `fileset.toSource` which creates a source dir
with the files of interest. `testers.shellcheck` passes all the files in
the source dir to shellcheck. The issue is related to relative path
sourcing, i.e. `source ./lib.sh` where shellcheck cannot make any
assumptions about the working directory.

Options were:
1) Disable this warning with a directive
   Prior disabling in the tree:
    - pkgs/tools/nix/info/info.sh
    - nixos/modules/testing/test-instrumentation.nix

2) Set source-path to SCRIPTDIR with a directive
   https://github.com/koalaman/shellcheck/wiki/Directive#source-path

   Even though we don't enable external script following for shellcheck
   with `-x` flag given every file in the source dir is passed, this
   directive seems to capture the intent to help shellcheck a bit
   better.

Went with option 2.
2025-05-12 09:58:28 -07:00
..
lib nixos/activation: Fix shellcheck test failure 2025-05-12 09:58:28 -07:00
activatable-system.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
activation-script.nix treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
bootspec.cue
bootspec.nix nixos/system/activation/bootspec: generalize the bootspec tooling package 2025-04-24 18:22:02 +02:00
no-clone.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
pre-switch-check.nix nixos/activation: document the arguments that are passed to the pre-switch-check script 2025-01-28 12:00:10 +01:00
specialisation.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
switch-to-configuration.pl switch-to-configuration: don't block on flock, see 7a56ddaf9d 2025-02-17 13:14:25 +01:00
switchable-system.nix nixos/activation: improve preSwitchChecks 2025-01-23 15:51:37 +01:00
test.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
top-level.nix treewide: Format all Nix files 2025-04-01 20:10:43 +02:00