File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
- bin/rubocop --autocorrect-all $*
6
- yarn prettier --write --list-different --ignore-unknown ${*:- ' **/*' }
7
- bin/bundle exec rufo ${*:- app}
8
- if [ -z " $* " ]; then
9
- bin/brakeman --quiet --no-summary --no-pager
10
- terraform fmt -recursive
5
+
6
+ usage () {
7
+ echo " Usage: $0 <pre-commit-run-args>"
8
+ echo " For pre-commit documentation run \` pre-commit run --help\` "
9
+ }
10
+
11
+ if [ " $1 " = " --help" ]; then
12
+ usage
13
+ exit 0
14
+ fi
15
+
16
+ if [ -z " $1 " ]; then
17
+ echo " No arguments provided. Running pre-commit with default arguments."
18
+ pre-commit run --all-files
11
19
else
12
- terraform fmt $*
20
+ echo " Running pre-commit with provided arguments: $@ "
21
+ pre-commit run " $@ "
13
22
fi
14
- tflint --chdir=terraform --init
15
- tflint --chdir=terraform --recursive
You can’t perform that action at this time.
0 commit comments