-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from garethahealy/main
added pre-commit
- Loading branch information
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|