Skip to content

Commit 503a119

Browse files
add shell script fmt and lint with pre-commit checks and fix errors (#500)
fixes #495 relates to #493, #494
1 parent b59f255 commit 503a119

File tree

14 files changed

+34
-19
lines changed

14 files changed

+34
-19
lines changed

.pre-commit-config.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ repos:
2323
- id: check-yaml
2424

2525
- repo: https://github.com/rbubley/mirrors-prettier
26-
rev: v3.4.2
26+
rev: v3.5.3
2727
hooks:
2828
- id: prettier
2929
files: \.(json|yml|yaml)$
3030
exclude: schemas/json-schema-draft-07.json
3131

3232
- repo: https://github.com/python-jsonschema/check-jsonschema
33-
rev: 0.30.0
33+
rev: 0.31.3
3434
hooks:
3535
- id: check-jsonschema
3636
alias: check-jsonschema-inst
@@ -59,11 +59,26 @@ repos:
5959
# args: ["--schemafile", "schemas/manual_version_schema.json"]
6060

6161
- repo: https://github.com/psf/black-pre-commit-mirror
62-
rev: 24.8.0
62+
rev: 25.1.0
6363
hooks:
6464
- id: black
6565

6666
- repo: https://github.com/asottile/pyupgrade
6767
rev: v3.19.1
6868
hooks:
6969
- id: pyupgrade
70+
71+
- repo: https://github.com/koalaman/shellcheck-precommit
72+
rev: v0.10.0
73+
hooks:
74+
- id: shellcheck
75+
args: ["--severity=error"]
76+
77+
- repo: https://github.com/scop/pre-commit-shfmt
78+
rev: v3.11.0-1
79+
hooks:
80+
- id: shfmt
81+
args:
82+
- --indent
83+
- "2"
84+
- --case-indent

bin/asciidoctor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
3+
ROOT=$(dirname $(realpath ${BASH_SOURCE[0]}))
44
source $ROOT/setup
55

66
$BUNDLE exec --gemfile $ROOT/Gemfile asciidoctor "$@"

bin/bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
3+
ROOT=$(dirname $(realpath ${BASH_SOURCE[0]}))
44
source $ROOT/setup
55

66
$BASH "$@"

bin/build_container

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(realpath $(dirname $(dirname $BASH_SOURCE[0])))
3+
ROOT=$(realpath $(dirname $(dirname ${BASH_SOURCE[0]})))
44

55
CONTAINER_TAG=`cat ${ROOT}/bin/.container-tag`
66

bin/bundle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
3+
ROOT=$(dirname $(realpath ${BASH_SOURCE[0]}))
44
source $ROOT/setup
55

66
$BUNDLE "$@"

bin/clean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(dirname $(realpath $BASH_SOURCE[0])))
3+
ROOT=$(dirname $(dirname $(realpath ${BASH_SOURCE[0]})))
44

55
rm -rf ${ROOT}/.stamps ${ROOT}/.home ${ROOT}/.bundle ${ROOT}/.singularity ${ROOT}/gen ${ROOT}/node_modules

bin/node

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
3+
ROOT=$(dirname $(realpath ${BASH_SOURCE[0]}))
44
source $ROOT/setup
55

66
$NODE "$@"

bin/npx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
3+
ROOT=$(dirname $(realpath ${BASH_SOURCE[0]}))
44
source $ROOT/setup
55

66
$NPX "$@"

bin/pip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(realpath $BASH_SOURCE[0]))
3+
ROOT=$(dirname $(realpath ${BASH_SOURCE[0]}))
44
source $ROOT/setup
55

66
if [ ! -v VIRTUAL_ENV ]; then

bin/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
ROOT=$(dirname $(dirname $(realpath $BASH_SOURCE[0])))
3+
ROOT=$(dirname $(dirname $(realpath ${BASH_SOURCE[0]})))
44
source $ROOT/bin/setup
55

66
$PYTHON -mpre_commit "$@"

0 commit comments

Comments
 (0)