File tree 2 files changed +22
-3
lines changed
2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,16 @@ fmt/terraform: $(wildcard *.tf)
41
41
terraform fmt -recursive
42
42
.PHONY : fmt/terraform
43
43
44
- fmt : fmt/prettier fmt/terraform
44
+ fmt/shfmt : $(shell shfmt -f .)
45
+ @echo " --- shfmt"
46
+ # Only do diff check in CI, errors on diff.
47
+ ifdef CI
48
+ shfmt -d $(shell shfmt -f .)
49
+ else
50
+ shfmt -w $(shell shfmt -f .)
51
+ endif
52
+
53
+ fmt : fmt/prettier fmt/terraform fmt/shfmt
45
54
.PHONY : fmt
46
55
47
56
gen : coderd/database/querier.go peerbroker/proto/peerbroker.pb.go provisionersdk/proto/provisioner.pb.go provisionerd/proto/provisionerd.pb.go site/src/api/typesGenerated.ts
@@ -53,9 +62,16 @@ install: build
53
62
@echo " -- CLI available at $( shell ls $( INSTALL_DIR) /coder* ) "
54
63
.PHONY : install
55
64
56
- lint :
65
+ lint : lint/shellcheck lint/go
66
+
67
+ lint/go :
57
68
golangci-lint run
58
- .PHONY : lint
69
+ .PHONY : lint/go
70
+
71
+ # Use shfmt to determine the shell files, takes editorconfig into consideration.
72
+ lint/shellcheck : $(shell shfmt -f .)
73
+ @echo " --- shellcheck"
74
+ shellcheck $(shell shfmt -f .)
59
75
60
76
peerbroker/proto/peerbroker.pb.go : peerbroker/proto/peerbroker.proto
61
77
protoc \
Original file line number Diff line number Diff line change @@ -5,3 +5,6 @@ indent_size = 2
5
5
[* .go ]
6
6
indent_style = tab
7
7
indent_size = unset
8
+
9
+ [node_modules/** ]
10
+ ignore = true
You can’t perform that action at this time.
0 commit comments