mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-11 08:55:27 +03:00
Implemented Makefile and actions for PR and push to validate fmt, go mod tidy , go build and go test
23 lines
455 B
Makefile
23 lines
455 B
Makefile
build:
|
|
go build
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
test:
|
|
go test -covermode atomic -coverprofile=profile.out ./...
|
|
|
|
tidy:
|
|
go mod tidy
|
|
|
|
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
|
|
golangci-lint:
|
|
@[ -f $(GOLANGCI_LINT) ] || { \
|
|
set -e ;\
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.29.0 ;\
|
|
}
|
|
|
|
lint: golangci-lint ## Run golangci-lint linter
|
|
$(GOLANGCI_LINT) run
|
|
|