Skip to content

Commit

Permalink
Merge #689: ci: shellcheck checks
Browse files Browse the repository at this point in the history
926bb05 ci: shellcheck checks (Jose Storopoli)

Pull request description:

  Following rust-bitcoin/rust-bitcoin#2762,
  adding CI shellcheck cheks here as well.

  I also did all fixes that I could find with

  ```bash
  shellcheck **/*.sh
  ```

  If I've missed any please let me know.

ACKs for top commit:
  apoelstra:
    ACK 926bb05
  tcharding:
    ACK 926bb05

Tree-SHA512: 1eb32b6d1f3008a03b70995c3b936921bad9a2ea7f329133e704fd9b4eb9bd7ec5cac7cd5e4a4a2ceff83eec03c785478cb1de37922b5b9d7787c907040876d4
  • Loading branch information
apoelstra committed May 20, 2024
2 parents 6895a06 + 926bb05 commit 8dee189
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

name: Shellcheck
on:
pull_request:
branches:
- master
jobs:
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/[email protected]
env:
SHELLCHECK_OPTS: -x # allow outside sources
2 changes: 2 additions & 0 deletions embedded/scripts/env.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# we don't want shebangs in env.sh, disable shellcheck warning
# shellcheck disable=SC2148
export RUSTFLAGS="-C link-arg=-Tlink.x"
export CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER="qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -semihosting-config enable=on,target=native -kernel"
3 changes: 2 additions & 1 deletion fuzz/cycle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

set -e
REPO_DIR=$(git rev-parse --show-toplevel)
# shellcheck source=./fuzz-util.sh
# can't find the file because of the ENV var
# shellcheck source=/dev/null
source "$REPO_DIR/fuzz/fuzz-util.sh"

while :
Expand Down
3 changes: 2 additions & 1 deletion fuzz/fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ set -ex

REPO_DIR=$(git rev-parse --show-toplevel)

# shellcheck source=./fuzz-util.sh
# can't find the file because of the ENV var
# shellcheck source=/dev/null
source "$REPO_DIR/fuzz/fuzz-util.sh"

# Check that input files are correct Windows file names
Expand Down
3 changes: 2 additions & 1 deletion fuzz/generate-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -e

REPO_DIR=$(git rev-parse --show-toplevel)

# shellcheck source=./fuzz-util.sh
# can't find the file because of the ENV var
# shellcheck source=/dev/null
source "$REPO_DIR/fuzz/fuzz-util.sh"

# 1. Generate fuzz/Cargo.toml
Expand Down

0 comments on commit 8dee189

Please sign in to comment.