@@ -11,7 +11,7 @@ export GO111MODULE = on
1111# Default target executed when no arguments are given to make.
1212default_target : all
1313
14- .PHONY : default_target
14+ .PHONY : build, default_target
1515
1616# ##############################################################################
1717# ## Tools & Dependencies ###
@@ -78,26 +78,31 @@ benchmark:
7878# ## Linting ###
7979# ##############################################################################
8080
81- lint :
81+ lint : lint-go lint-python lint-contracts
82+
83+ lint-go :
84+ gofumpt -l .
8285 golangci-lint run --out-format=tab
86+
87+ lint-python :
88+ find . -name " *.py" -type f -not -path " */node_modules/*" | xargs pylint
89+ flake8
90+
91+ lint-contracts :
8392 solhint contracts/** /* .sol
8493
8594lint-fix :
8695 golangci-lint run --fix --out-format=tab --issues-exit-code=0
8796
8897lint-fix-contracts :
89- @cd contracts && \
90- npm i && \
91- npm run lint-fix
9298 solhint --fix contracts/** /* .sol
9399
94- .PHONY : lint lint-fix
100+ .PHONY : lint lint-fix lint-contracts lint-go lint-python
95101
96- format :
97- find . -name ' *.go' -type f -not -path " ./vendor*" -not -path " *.git*" -not -name ' *.pb.go' -not -name ' *.pb.gw.go' | xargs gofumpt -w -l
98-
99- .PHONY : format
102+ format : format-go format-python format-shell
100103
104+ format-go :
105+ find . -name ' *.go' -type f -not -path " ./vendor*" -not -path " *.git*" -not -path " ./client/docs/statik/statik.go" -not -name ' *.pb.go' -not -name ' *.pb.gw.go' -not -name ' *.pulsar.go' | xargs gofumpt -w -l
101106
102107format-python : format-isort format-black
103108
@@ -107,11 +112,16 @@ format-black:
107112format-isort :
108113 find . -name ' *.py' -type f -not -path " */node_modules/*" | xargs isort
109114
115+ format-shell :
116+ shfmt -l -w .
117+
118+ .PHONY : format format-go format-python format-black format-isort format-go
119+
110120# ##############################################################################
111121# ## Protobuf ###
112122# ##############################################################################
113123
114- protoVer =0.11.6
124+ protoVer =0.14.0
115125protoImageName =ghcr.io/cosmos/proto-builder:$(protoVer )
116126protoImage =$(DOCKER ) run --rm -v $(CURDIR ) :/workspace --workdir /workspace --user 0 $(protoImageName )
117127
@@ -128,6 +138,7 @@ proto-all: proto-format proto-lint proto-gen
128138proto-gen :
129139 @echo " generating implementations from Protobuf files"
130140 @$(protoImage ) sh ./scripts/generate_protos.sh
141+ @$(protoImage ) sh ./scripts/generate_protos_pulsar.sh
131142
132143proto-format :
133144 @echo " formatting Protobuf files"
0 commit comments