Skip to content

Commit

Permalink
Merge pull request #130 from garethahealy/main
Browse files Browse the repository at this point in the history
added pre-commit
  • Loading branch information
garethahealy authored Aug 1, 2024
2 parents 894754e + a61aeb2 commit 70464bb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: local
hooks:
- id: shellcheck
name: Shellcheck
description: Check syntax of bash files
entry: shellcheck
language: python
types: [ shell ]
require_serial: true # shellcheck can detect sourcing this way
3 changes: 2 additions & 1 deletion test/load.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# shellcheck disable=all

# Check all the dev-tools are installed
command -v diff &> /dev/null || { echo >&2 'ERROR: diff not installed - Aborting'; exit 1; }
command -v bc &> /dev/null || { echo >&2 'ERROR: bc not installed - Aborting'; exit 1; }

# shellcheck source=../load.bash
source "$(dirname "${BASH_SOURCE[0]}")/../load.bash"
1 change: 1 addition & 0 deletions test/tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bats
# shellcheck disable=all

load bats-support-clone
load test_helper/bats-support/load
Expand Down

0 comments on commit 70464bb

Please sign in to comment.