[PR #2703] [MERGED] Fix invocation of golangci-lint #2811

Closed
opened 2025-12-29 04:19:05 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2703
Author: @nblock
Created: 7/23/2025
Status: Merged
Merged: 7/24/2025
Merged by: @kradalby

Base: mainHead: ghlint


📝 Commits (1)

  • 89e62b0 Fix invocation of golangci-lint

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 .github/workflows/lint.yml (+4 -1)

📄 Description

The argument --format=colored-line-number is invalid and --out-format=colored-line-number is no longer available. Fixup according to the migration guide.

Tested this locally via:

$ nix develop
$ golangci-lint run --new-from-rev=3123d5286bbeb1d4958cec3c92d5a0969b201a9b --output.text.path=stdout --output.text.print-linter-name --output.text.print-issued-lines --output.text.colors
hscontrol/oidc.go:281:29: printf: (*github.com/rs/zerolog.Event).Msgf format %s has arg userinfo of wrong type *github.com/coreos/go-oidc/v3/oidc.UserInfo (govet)
        log.Info().Msgf("UserInfo: %s", userinfo)
                                   ^
hscontrol/oidc.go:404:33: printf: (*github.com/rs/zerolog.Event).Msgf format %s has arg oauth2Token of wrong type *golang.org/x/oauth2.Token (govet)
        log.Info().Msgf("oauth2 Token: %s", oauth2Token)
                                       ^
hscontrol/oidc.go:417:2: missing whitespace above this line (invalid statement above expr) (wsl_v5)
        log.Info().Msgf("ID Token: %s", rawIDToken)
        ^
3 issues:
* govet: 2
* wsl_v5: 1

  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2703 **Author:** [@nblock](https://github.com/nblock) **Created:** 7/23/2025 **Status:** ✅ Merged **Merged:** 7/24/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `ghlint` --- ### 📝 Commits (1) - [`89e62b0`](https://github.com/juanfont/headscale/commit/89e62b0d91321394b738aa33baa48e32b11074f3) Fix invocation of golangci-lint ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/lint.yml` (+4 -1) </details> ### 📄 Description The argument `--format=colored-line-number` is invalid and `--out-format=colored-line-number` is no longer available. Fixup according to the migration guide. Tested this locally via: ```console $ nix develop $ golangci-lint run --new-from-rev=3123d5286bbeb1d4958cec3c92d5a0969b201a9b --output.text.path=stdout --output.text.print-linter-name --output.text.print-issued-lines --output.text.colors hscontrol/oidc.go:281:29: printf: (*github.com/rs/zerolog.Event).Msgf format %s has arg userinfo of wrong type *github.com/coreos/go-oidc/v3/oidc.UserInfo (govet) log.Info().Msgf("UserInfo: %s", userinfo) ^ hscontrol/oidc.go:404:33: printf: (*github.com/rs/zerolog.Event).Msgf format %s has arg oauth2Token of wrong type *golang.org/x/oauth2.Token (govet) log.Info().Msgf("oauth2 Token: %s", oauth2Token) ^ hscontrol/oidc.go:417:2: missing whitespace above this line (invalid statement above expr) (wsl_v5) log.Info().Msgf("ID Token: %s", rawIDToken) ^ 3 issues: * govet: 2 * wsl_v5: 1 ``` --- - [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file - [ ] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [ ] updated CHANGELOG.md --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:19:05 +01:00
adam closed this issue 2025-12-29 04:19:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2811