Skip to content

Use a better way of pinning the version of golangci-lint #4733

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stefanhaller
Copy link
Collaborator

@stefanhaller stefanhaller commented Jul 13, 2025

  • PR Description

Instead of requiring the user to install the right version of the tool in their .bin folder, create a shim that automatically runs the right version of the tool. This has several benefits:

  • it works out of the box with no setup required (the tool will be automatically downloaded and compiled the first time it is used)
  • no work needed for developers when we bump the golangci-lint version
  • it works in working copies that are used in different environments (e.g. locally on a Mac, or inside a dev container)

Approach suggested by @kyu08.

Replaces #4729.

@stefanhaller stefanhaller added the maintenance For refactorings, CI changes, tests, version bumping, etc label Jul 13, 2025
Copy link

codacy-production bot commented Jul 13, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 9625ee81
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (9625ee8) Report Missing Report Missing Report Missing
Head commit (ad8c1b5) 56855 49321 86.75%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4733) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@stefanhaller stefanhaller force-pushed the pin-version-of-golangci-lint branch from eb54a50 to 22b2b9a Compare July 13, 2025 13:02
stefanhaller and others added 2 commits July 13, 2025 17:57
Instead of requiring the user to install the right version of the tool in their
.bin folder, create a shim that automatically runs the right version of the
tool. This has several benefits:
- it works out of the box with no setup required (the tool will be automatically
  downloaded and compiled the first time it is used)
- no work needed for developers when we bump the golangci-lint version
- it works in working copies that are used in different environments (e.g.
  locally on a Mac, or inside a dev container)

Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>
@stefanhaller stefanhaller force-pushed the pin-version-of-golangci-lint branch from 22b2b9a to ad8c1b5 Compare July 13, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance For refactorings, CI changes, tests, version bumping, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant