diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..32b0c9e08 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,14 @@ +### Description + +_Provide description of this PR and changes._ + +### Checklist + +- [ ] Tests added and all succeed (`make test`) +- [ ] Regenerated mocks, etc. (`make generate`) +- [ ] Linted (`make lint`) +- [ ] Test your changes work for the [CLI](https://github.com/snyk/cli) + 1. Uncomment the line near the bottom of [go.mod](https://github.com/snyk/cli/blob/main/cliv2/go.mod) to point to your local GAF code. + 2. Run `go mod tidy` in the `cliv2` directory. + 3. Run the CLI tests and do any required manual testing. + - Once this PR is merged, make a PR in the [CLI](https://github.com/snyk/cli/pulls) repo to increment the version of GAF in the [go.mod](https://github.com/snyk/cli/blob/main/cliv2/go.mod). diff --git a/Makefile b/Makefile index 6d9aa9680..d3c5f2148 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ GOARCH = $(shell go env GOARCH) GO_BIN := $(shell pwd)/.bin OVERRIDE_GOCI_LINT_V := v1.60.1 -SHELL := env PATH=$(GO_BIN):$(PATH) $(SHELL) +SHELL := env PATH="$(GO_BIN):$(PATH)" $(SHELL) .PHONY: format format: @@ -38,14 +38,14 @@ testv: @go test -v ./... -race .PHONY: generate -generate: +generate: tools + @echo "Generating generated files..." @go generate ./... @make format .PHONY: tools -tools: $(GO_BIN)/golangci-lint $(GO_BIN)/cue - GOBIN=$(GO_BIN) go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 - GOBIN=$(GO_BIN) go install github.com/golang/mock/mockgen@v1.6.0 +tools: $(GO_BIN)/cue $(GO_BIN)/golangci-lint $(GO_BIN)/oapi-codegen $(GO_BIN)/mockgen + @echo "Installing tools..." $(GO_BIN)/cue: GOBIN=$(GO_BIN) go install cuelang.org/go/cmd/cue@v0.10.0 @@ -53,6 +53,12 @@ $(GO_BIN)/cue: $(GO_BIN)/golangci-lint: curl -sSfL 'https://raw.githubusercontent.com/golangci/golangci-lint/${OVERRIDE_GOCI_LINT_V}/install.sh' | sh -s -- -b ${GO_BIN} ${OVERRIDE_GOCI_LINT_V} +$(GO_BIN)/mockgen: + GOBIN=$(GO_BIN) go install github.com/golang/mock/mockgen@v1.6.0 + +$(GO_BIN)/oapi-codegen: + GOBIN=$(GO_BIN) go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 + .PHONY: update-local-findings update-local-findings: @scripts/pull-down-test-api-spec.sh @@ -61,9 +67,11 @@ update-local-findings: .PHONY: help help: @echo "Main targets:" + @echo "$(LOG_PREFIX) tools Installs the tools required for development and testing" @echo "$(LOG_PREFIX) format" @echo "$(LOG_PREFIX) lint" @echo "$(LOG_PREFIX) build" + @echo "$(LOG_PREFIX) generate Regenerates generated files (e.g. mocks)" @echo "$(LOG_PREFIX) test" @echo "$(LOG_PREFIX) testv Test versbosely" @echo "$(LOG_PREFIX) GOOS Specify Operating System to compile for (see golang GOOS, default=$(GOOS))" diff --git a/internal/api/analytics/2024-03-07/analytics.go b/internal/api/analytics/2024-03-07/analytics.go index 7d0364c3b..0fe660eb0 100644 --- a/internal/api/analytics/2024-03-07/analytics.go +++ b/internal/api/analytics/2024-03-07/analytics.go @@ -1,4 +1,4 @@ -// Package clients provides primitives to interact with the openapi HTTP API. +// Package v20240307 provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. package v20240307