Skip to content

Commit

Permalink
build: add shellcheck 0.10.0 (nixpkgs/2262165)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgallag committed Dec 19, 2024
1 parent e5ee1ce commit 79795de
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 1 deletion.
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC1090,SC1091,SC2016
1 change: 1 addition & 0 deletions dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ scripts_dir="${runhub_dir}"/scripts
"${scripts_dir}"/install-upgrade-devbox.sh
"${scripts_dir}"/install-upgrade-direnv.sh
. "${scripts_dir}"/load-envrc.sh
"${scripts_dir}"/run-shellcheck.sh
5 changes: 4 additions & 1 deletion devbox.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.7/.schema/devbox.schema.json"
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.7/.schema/devbox.schema.json",
"packages": {
"shellcheck": "latest"
}
}
109 changes: 109 additions & 0 deletions devbox.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{
"lockfile_version": "1",
"packages": {
"shellcheck@latest": {
"last_modified": "2024-11-28T07:51:56Z",
"resolved": "github:NixOS/nixpkgs/226216574ada4c3ecefcbbec41f39ce4655f78ef#shellcheck",
"source": "devbox-search",
"version": "0.10.0",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/vbk29hlm6366ypf7sjpmhqfq77fci4hk-shellcheck-0.10.0-bin",
"default": true
},
{
"name": "man",
"path": "/nix/store/9y8j1pjnbm4x63jfwr2457ari50bcwkq-shellcheck-0.10.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/r2h67i2vlh2z3i6a95a6cq7aga8n5lai-shellcheck-0.10.0-doc",
"default": true
},
{
"name": "out",
"path": "/nix/store/mppnnmgsnvl7hy2day2cpbb3synwnvz9-shellcheck-0.10.0"
}
],
"store_path": "/nix/store/vbk29hlm6366ypf7sjpmhqfq77fci4hk-shellcheck-0.10.0-bin"
},
"aarch64-linux": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/k70kq24labhf2r54xj8jsvs3kqm6lwxp-shellcheck-0.10.0-bin",
"default": true
},
{
"name": "man",
"path": "/nix/store/7pd0kr8a8xqz1wh2l1swk9wckf6v40c1-shellcheck-0.10.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/hwgj8c8y279zrvf2mnspcndp6dp9z1x7-shellcheck-0.10.0-doc",
"default": true
},
{
"name": "out",
"path": "/nix/store/rp0p9h4svwz890wmdm3afdl8655rg1m4-shellcheck-0.10.0"
}
],
"store_path": "/nix/store/k70kq24labhf2r54xj8jsvs3kqm6lwxp-shellcheck-0.10.0-bin"
},
"x86_64-darwin": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/dflfkn5aiywxikdqb524lbk7qa51c7vn-shellcheck-0.10.0-bin",
"default": true
},
{
"name": "man",
"path": "/nix/store/azgfvnl4f4cri68ns1j7k3642bl103i7-shellcheck-0.10.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/ry5kz9ln9r7lyv5qhv39d3gfr5fl6qkp-shellcheck-0.10.0-doc",
"default": true
},
{
"name": "out",
"path": "/nix/store/pp1bmvzn76lkg4xk4rxww2i6bnqz7bva-shellcheck-0.10.0"
}
],
"store_path": "/nix/store/dflfkn5aiywxikdqb524lbk7qa51c7vn-shellcheck-0.10.0-bin"
},
"x86_64-linux": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/dkssi8wkf0yg2x0lpmafi49crmyxraix-shellcheck-0.10.0-bin",
"default": true
},
{
"name": "man",
"path": "/nix/store/nkp960f3ialydb6jvw8ac7l44lkw68by-shellcheck-0.10.0-man",
"default": true
},
{
"name": "doc",
"path": "/nix/store/aikkw4sxmdi6n3nlgrl6gq5415w0dpam-shellcheck-0.10.0-doc",
"default": true
},
{
"name": "out",
"path": "/nix/store/zchhiq4nzmqnlcdwac35d8l951f34776-shellcheck-0.10.0"
}
],
"store_path": "/nix/store/dkssi8wkf0yg2x0lpmafi49crmyxraix-shellcheck-0.10.0-bin"
}
}
}
}
}
14 changes: 14 additions & 0 deletions scripts/run-shellcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -o errexit
set -o nounset

scripts_dir="$(dirname "$0")"
runhub_dir="${scripts_dir}"/..

. "${scripts_dir}"/load-envrc.sh
echo 'Running `shellcheck`...'
find -L "${runhub_dir}" \
! \( -path '*/.git/*' -o -path '*/.devbox/*' \) -a \
\( -name '*.sh' -o -name '.envrc' \) -a \
-exec shellcheck {} +

0 comments on commit 79795de

Please sign in to comment.