Skip to content

golangci-lint: make .golangci.yaml compatible again with non-custom build#44295

Merged
ti-mo merged 2 commits intocilium:mainfrom
ti-mo:tb/make-golangci-lint-work-again
Feb 13, 2026
Merged

golangci-lint: make .golangci.yaml compatible again with non-custom build#44295
ti-mo merged 2 commits intocilium:mainfrom
ti-mo:tb/make-golangci-lint-work-again

Conversation

@ti-mo
Copy link
Copy Markdown
Contributor

@ti-mo ti-mo commented Feb 11, 2026

  • golangci-lint.sh would always rebuild the binary. Simplify the script and fix the rebuild trigger.
  • Move kubeapi golangci config to dedicated file so golangci-lint run in repo root works again with a default install (e.g. from distro package manager or Docker image)
  • Specify -ti arguments to the Dockerized makefile target to make it obey ^C

golangci-lint.sh would always rebuild the binary. The script was over-engineered
and didn't use the `golangci-lint version` subcommand, which doesn't need the
version string parsing logic. Simplify the script and fix the rebuild trigger.

Prepare the directory structure for splitting the main .golangci-lint.yaml in a
subsequent commit.

Signed-off-by: Timo Beckers <timo@isovalent.com>
The addition of kubeapilinter forced all users of the main .golangci.yaml to be
running a custom-built version of the tool and make sure it's kept in sync.

VSCode runs `golangci-lint run` in the repo by default and requires explicit
configuration to use another tool, like a script in the Cilium repository.
Before this PR, the script was broken and would always rebuilt custom-gcl.

Breaking the default tooling is not great. This commit moves kubeapi-specific
configuration to a dedicated config file in tools/golangci-lint-kubeapi and
specifies it explicitly when starting the kubeapi linter.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 11, 2026
@ti-mo ti-mo added the release-note/ci This PR makes changes to the CI. label Feb 11, 2026
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 11, 2026
@ti-mo ti-mo marked this pull request as ready for review February 11, 2026 09:26
@ti-mo ti-mo requested review from a team as code owners February 11, 2026 09:26
@ti-mo
Copy link
Copy Markdown
Contributor Author

ti-mo commented Feb 11, 2026

/test

@ti-mo ti-mo enabled auto-merge February 11, 2026 16:44
Copy link
Copy Markdown
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a huge amount of context on this change, but changes look sensible to me.

@ti-mo ti-mo added this pull request to the merge queue Feb 13, 2026
Merged via the queue into cilium:main with commit 2560a9a Feb 13, 2026
94 checks passed
@ti-mo ti-mo deleted the tb/make-golangci-lint-work-again branch February 13, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ci This PR makes changes to the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants