diff --git a/.github/workflows/check-generated.yml b/.github/workflows/check-generated.yml index f484aa08da8..1f3cae8096e 100644 --- a/.github/workflows/check-generated.yml +++ b/.github/workflows/check-generated.yml @@ -45,7 +45,7 @@ jobs: steps: - uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - uses: actions/checkout@v4 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ccc896ce022..d38ca74772a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,37 +1,36 @@ -name: Golang Linter -# Lint runs golangci-lint over the entire CometBFT repository. +name: Lint, format and check the code for typos +# Lint runs `make lint` # -# This workflow is run on every pull request and push to v0.38.x. -# -# The `golangci` job will pass without running if no *.{go, mod, sum} -# files have been modified. +# This workflow is run on every pull request and push to main. # # To run this locally, simply run `make lint` from the root of the repo. on: pull_request: + merge_group: push: branches: - - v0.38.x + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + jobs: - golangci: - name: golangci-lint + lint: + name: lint runs-on: ubuntu-latest - timeout-minutes: 8 + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: '1.21' - - uses: technote-space/get-diff-action@v6 + - uses: actions/setup-python@v5 with: - PATTERNS: | - **/**.go - go.mod - go.sum - - uses: golangci/golangci-lint-action@v3 + python-version: '3.x' + + - run: echo "GO_VERSION=$(cat .github/workflows/go-version.env | grep GO_VERSION | cut -d '=' -f2)" >> $GITHUB_ENV + + - uses: actions/setup-go@v5 with: - version: latest - args: --timeout 10m - github-token: ${{ secrets.github_token }} - if: env.GIT_DIFF + go-version: ${{ env.GO_VERSION }} + + - uses: pre-commit/action@v3.0.1 \ No newline at end of file diff --git a/Makefile b/Makefile index b004c73df2c..b701c269abd 100644 --- a/Makefile +++ b/Makefile @@ -120,8 +120,8 @@ mockery: #? check-proto-deps: Check protobuf deps check-proto-deps: -ifeq (,$(shell which protoc-gen-gogofaster)) - @go install github.com/cosmos/gogoproto/protoc-gen-gogofaster@latest +ifeq (,$(shell which protoc-gen-gocosmos)) + @go install github.com/cosmos/gogoproto/protoc-gen-gocosmos@latest endif .PHONY: check-proto-deps diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index 203aeeeb313..5b9860d6b7e 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -4412,6 +4412,7 @@ func _ABCI_FinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +var ABCI_serviceDesc = _ABCI_serviceDesc var _ABCI_serviceDesc = grpc.ServiceDesc{ ServiceName: "tendermint.abci.ABCI", HandlerType: (*ABCIServer)(nil), diff --git a/buf.yaml b/buf.yaml deleted file mode 100644 index 5f837667856..00000000000 --- a/buf.yaml +++ /dev/null @@ -1,13 +0,0 @@ -build: - roots: - - proto -lint: - use: - - BASIC - - FILE_LOWER_SNAKE_CASE - - UNARY_RPC - ignore: - - gogoproto -breaking: - use: - - FILE diff --git a/proto/tendermint/rpc/grpc/types.pb.go b/proto/tendermint/rpc/grpc/types.pb.go index 393c7394764..c27afb4e246 100644 --- a/proto/tendermint/rpc/grpc/types.pb.go +++ b/proto/tendermint/rpc/grpc/types.pb.go @@ -329,6 +329,7 @@ func _BroadcastAPI_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +var BroadcastAPI_serviceDesc = _BroadcastAPI_serviceDesc var _BroadcastAPI_serviceDesc = grpc.ServiceDesc{ ServiceName: "tendermint.rpc.grpc.BroadcastAPI", HandlerType: (*BroadcastAPIServer)(nil), diff --git a/rpc/grpc/types.pb.go b/rpc/grpc/types.pb.go index 393c7394764..c27afb4e246 100644 --- a/rpc/grpc/types.pb.go +++ b/rpc/grpc/types.pb.go @@ -329,6 +329,7 @@ func _BroadcastAPI_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +var BroadcastAPI_serviceDesc = _BroadcastAPI_serviceDesc var _BroadcastAPI_serviceDesc = grpc.ServiceDesc{ ServiceName: "tendermint.rpc.grpc.BroadcastAPI", HandlerType: (*BroadcastAPIServer)(nil),