Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-test: remove go vet, tweak golangci-lint, change order #542

Merged
merged 12 commits into from
Aug 26, 2024
Merged

Conversation

marians
Copy link
Member

@marians marians commented Aug 22, 2024

In this PR I'm mainly removing the separate execution of go vet, as it's redundant with the checks executed by golangci-lint.

Additional changes:

  • Set --max-issues-per-linter to 0 (unlimited) in golangci-lint execution
  • Using the environment key to set environment variables in a more idiomatic way
  • Run go test before golangci-lint (see below)
  • Adding a persistent cache for golangci-lint. We'll have to evaluate in practice whether this really speeds up anything.

During testing I noticed that golangci-lint can take a relatively long time to end up finding a compilation problem, like a breaking API change in a major dependency upgrade.

To catch problems like this faster, I moved the go test step to happen before the golangci-lint step. This means that compilation problems are already found in the build that happens on go test, and according to my tests with kubectl-gs, this is faster than the golangci-lint execution.

Checklist

@marians marians self-assigned this Aug 22, 2024
@marians marians requested a review from a team as a code owner August 22, 2024 13:07
@marians marians changed the title Remove go vet, tweak golangci-lint go-test: remove go vet, tweak golangci-lint Aug 22, 2024
@architectbot
Copy link
Contributor

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:7622f132a9242d03e307be220ed579301bc0a242
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:alpha

@architectbot
Copy link
Contributor

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:be0854ef09458a6aa34878a0eaa0078fd6d8d386
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:alpha

@architectbot
Copy link
Contributor

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:09b49e817eb8b7cb0d656cf4af6b8ccf64458440
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:alpha

@architectbot
Copy link
Contributor

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:6f46a94ff501e77dd5db2cc9d5a7d0af3ce8144f
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:alpha

@architectbot
Copy link
Contributor

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:800b018b96c7dcf437f7fed3ade1b7d0a7f896ca
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:alpha

@marians marians changed the title go-test: remove go vet, tweak golangci-lint go-test: remove go vet, tweak golangci-lint, change order Aug 23, 2024
@architectbot
Copy link
Contributor

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:b32ff73c5f46df8aaf079907cf741572d0dda7a1
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:alpha

@architectbot
Copy link
Contributor

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:7d8883f6a09d09c1f4dd8c4e28871140c05d3903
https://circleci.com/developer/orbs/orb/giantswarm/architect?version=dev:alpha

@marians marians merged commit bc3cf49 into main Aug 26, 2024
5 checks passed
@marians marians deleted the remove-go-vet branch August 26, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants