File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -17,15 +17,17 @@ pre-commit:
17
17
prettier :
18
18
tags : style glue
19
19
glob : " *.{json,md,yaml,yml}"
20
- run : prettier --check {staged_files}
20
+ stage_fixed : true
21
+ run : prettier --write {staged_files}
21
22
shellcheck :
22
23
tags : lint shell
23
24
glob : " *.{bash,sh}"
24
25
run : shellcheck {staged_files}
25
26
shfmt :
26
27
tags : style shell
27
28
glob : " *.{bash,sh}"
28
- run : shfmt -d {staged_files}
29
+ stage_fixed : true
30
+ run : shfmt -w {staged_files}
29
31
yamllint :
30
32
tags : lint yaml
31
33
glob : " *.{yaml,yml}"
Original file line number Diff line number Diff line change @@ -7,9 +7,11 @@ pre-commit:
7
7
terraform-fmt :
8
8
tags : style terraform
9
9
glob : " *.{tf,tfvars}"
10
- run : terraform fmt -check -diff {staged_files}
10
+ stage_fixed : true
11
+ run : terraform fmt -write {staged_files}
11
12
tflint :
12
13
tags : lint terraform
13
14
glob : " *.{tf,tfvars}"
15
+ stage_fixed : true
14
16
run : |
15
- for file in {staged_files}; do tflint --recursive --filter=$(basename "$file"); done
17
+ for file in {staged_files}; do tflint --fix -- recursive --filter=$(basename "$file"); done
You can’t perform that action at this time.
0 commit comments