Skip to content

Commit 33adbbd

Browse files
committed
chore: Replace Hookah with lefthook
1 parent b19f860 commit 33adbbd

File tree

7 files changed

+23
-258
lines changed

7 files changed

+23
-258
lines changed

.hooks/.hookah/lib.sh

Lines changed: 0 additions & 246 deletions
This file was deleted.

.hooks/pre-commit

Lines changed: 0 additions & 7 deletions
This file was deleted.

.lefthook.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pre-commit:
2+
commands:
3+
test:
4+
run: './bake test'
5+
lint:
6+
run: './bake lint'

.shellcheckrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
disable=SC2034

Bakefile.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
# shellcheck shell=bash
22

3-
task.docs() {
4-
shdoc < './pkg/src/public/bash-term.sh' > './docs/bash-term.md'
3+
task.test() {
4+
bats tests
55
}
66

7-
task.lint() {
7+
task.format() {
88
shfmt -w -ln bash -sr ./pkg ./Bakefile.sh
99
}
10+
11+
task.lint() {
12+
shellcheck ./pkg/**/*.sh
13+
}
14+
15+
task.docs() {
16+
shdoc < './pkg/src/public/bash-term.sh' > './docs/bash-term.md'
17+
}

basalt.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ version = '0.6.3'
88
authors = ['Edwin Kofler <edwin@kofler.dev>']
99

1010
[run]
11-
dependencies = ['https://github.com/hyperupcall/bash-core@v0.11.0']
11+
dependencies = [
12+
'https://github.com/hyperupcall/bash-core@v0.11.0',
13+
'https://github.com/hyperupcall/bats-all.git@v4.1.0',
14+
]
1215
binDirs = []
1316
sourceDirs = ['pkg/src/public', 'pkg/src/util']
1417
builtinDirs = []

tests/test_alfa.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
load './util/init.sh'
44

55
@test "Outputs 'woofers!'" {
6-
run bash-tty
6+
run echo 'woofers!'
77

88
[ "$status" -eq 0 ]
99
[ "$output" = "woofers!" ]

0 commit comments

Comments
 (0)