mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
ci: go mod tidy check (#8263)
This commit is contained in:
parent
ec2f50f74e
commit
80d40ef898
1
Makefile
1
Makefile
@ -170,6 +170,7 @@ lintci:
|
||||
lint:
|
||||
@cd erigon-lib && $(MAKE) lint
|
||||
@./erigon-lib/tools/golangci_lint.sh
|
||||
@./erigon-lib/tools/mod_tidy_check.sh
|
||||
|
||||
## clean: cleans the go cache, build dir, libmdbx db dir
|
||||
clean:
|
||||
|
@ -90,8 +90,11 @@ lint-licenses-deps:
|
||||
lint-licenses:
|
||||
@./tools/licenses_check.sh
|
||||
|
||||
lint-mod-tidy:
|
||||
@./tools/mod_tidy_check.sh
|
||||
|
||||
lint-deps: lintci-deps lint-licenses-deps
|
||||
lint: lintci lint-licenses
|
||||
lint: lintci lint-licenses lint-mod-tidy
|
||||
|
||||
test:
|
||||
$(GOTEST) --count 1 -p 2 ./...
|
||||
|
@ -15,7 +15,7 @@ then
|
||||
echo "golangci-lint tool is not found, install it with:"
|
||||
echo " $scriptName --install-deps"
|
||||
echo "or follow https://golangci-lint.run/usage/install/"
|
||||
exit
|
||||
exit 2
|
||||
fi
|
||||
|
||||
golangci-lint run --config ./.golangci.yml
|
||||
|
@ -15,7 +15,7 @@ if ! which go-licenses > /dev/null
|
||||
then
|
||||
echo "go-licenses tool is not found, install it with:"
|
||||
echo " go install github.com/google/go-licenses@$goLicensesVersion"
|
||||
exit
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# enable build tags to cover maximum .go files
|
||||
|
9
erigon-lib/tools/mod_tidy_check.sh
Executable file
9
erigon-lib/tools/mod_tidy_check.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
go mod tidy
|
||||
|
||||
if ! git diff --exit-code -- go.mod go.sum
|
||||
then
|
||||
echo "ERROR: go.mod/sum is not tidy. Run 'go mod tidy' in $PWD and commit the changes."
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user