Skip to content

Comments

bash: Fix shellcheck lint#145830

Merged
roberth merged 1 commit intoNixOS:masterfrom
l0b0:fix-shellcheck-lints
Nov 28, 2021
Merged

bash: Fix shellcheck lint#145830
roberth merged 1 commit intoNixOS:masterfrom
l0b0:fix-shellcheck-lints

Conversation

@l0b0
Copy link
Contributor

@l0b0 l0b0 commented Nov 14, 2021

Motivation for this change

Existing issues requesting ShellCheck compliance: #133088, #21166.

This change mostly prepares for ShellCheck by indicating which shell (Bash in all the cases I could find) ShellCheck should interpret the code as, and by configuring pre-commit to use the latest version of ShellCheck.

Let me know if this should be split up in some other way.

The EditorConfig errors seem to be from the existing source - I've create a separate PR (merged) to fix those.

Note to self: To list all paths with a specific issue, change .pre-commit-config.yaml to set e.g.

args: [--format=json, --include=SC1008]
require_serial: true

Then pre-commit run --all-files | tail +5 | jq --raw-output '.[] | .file' | xargs --max-args=1 idea-ultimate to pass all the files to IDEA.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Nov 14, 2021
@l0b0 l0b0 force-pushed the fix-shellcheck-lints branch from f3d6e83 to 1d14ca9 Compare November 14, 2021 01:14
@github-actions github-actions bot added 6.topic: emacs Text editor 6.topic: erlang General-purpose, concurrent, functional high-level programming language 6.topic: haskell General-purpose, statically typed, purely functional programming language 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python Python is a high-level, general-purpose programming language. 6.topic: qt/kde Object-oriented framework for GUI creation 6.topic: rust General-purpose programming language emphasizing performance, type safety, and concurrency. 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: kernel The Linux kernel labels Nov 14, 2021
@l0b0 l0b0 marked this pull request as ready for review November 14, 2021 02:59
@l0b0 l0b0 force-pushed the fix-shellcheck-lints branch from 00324d9 to 34f54b0 Compare November 23, 2021 07:36
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. and removed 10.rebuild-darwin-stdenv This PR causes stdenv to rebuild on Darwin and must target a staging branch. 10.rebuild-linux-stdenv This PR causes stdenv to rebuild on Linux and must target a staging branch. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Nov 23, 2021
@l0b0 l0b0 requested a review from roberth November 27, 2021 01:43
@l0b0
Copy link
Contributor Author

l0b0 commented Nov 27, 2021

@Artturin

@roberth roberth merged commit 7658c0d into NixOS:master Nov 28, 2021
@l0b0 l0b0 deleted the fix-shellcheck-lints branch November 28, 2021 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants