Linter Fails #144

Closed
opened 2025-12-29 01:23:58 +01:00 by adam · 2 comments
Owner

Originally created by @m-tanner-dev0 on GitHub (Feb 28, 2022).

Bug description

I am just getting started with this repo and have identified a "clean up" task. I might just fix it myself, but since it's a cyclomatic complexity issue, is might not be a trivial fix.

To Reproduce

  1. make dev
  2. Fails
golangci-lint run --fix --timeout 10m
oidc.go:134:1: Function name: OIDCCallback, Cyclomatic Complexity: 22, Halstead Volume: 4757.77, Maintainability Index: 19 (maintidx)
func (h *Headscale) OIDCCallback(ctx *gin.Context) {
^
poll.go:34:1: Function name: PollNetMapHandler, Cyclomatic Complexity: 18, Halstead Volume: 5318.34, Maintainability Index: 19 (maintidx)
func (h *Headscale) PollNetMapHandler(ctx *gin.Context) {
^
poll.go:272:1: Function name: PollNetMapStream, Cyclomatic Complexity: 20, Halstead Volume: 6635.19, Maintainability Index: 16 (maintidx)
func (h *Headscale) PollNetMapStream(

Context info

No context required.

Originally created by @m-tanner-dev0 on GitHub (Feb 28, 2022). **Bug description** I am just getting started with this repo and have identified a "clean up" task. I might just fix it myself, but since it's a cyclomatic complexity issue, is might not be a trivial fix. **To Reproduce** 1. `make dev` 2. Fails ``` golangci-lint run --fix --timeout 10m oidc.go:134:1: Function name: OIDCCallback, Cyclomatic Complexity: 22, Halstead Volume: 4757.77, Maintainability Index: 19 (maintidx) func (h *Headscale) OIDCCallback(ctx *gin.Context) { ^ poll.go:34:1: Function name: PollNetMapHandler, Cyclomatic Complexity: 18, Halstead Volume: 5318.34, Maintainability Index: 19 (maintidx) func (h *Headscale) PollNetMapHandler(ctx *gin.Context) { ^ poll.go:272:1: Function name: PollNetMapStream, Cyclomatic Complexity: 20, Halstead Volume: 6635.19, Maintainability Index: 16 (maintidx) func (h *Headscale) PollNetMapStream( ``` **Context info** No context required.
adam added the bug label 2025-12-29 01:23:58 +01:00
adam closed this issue 2025-12-29 01:23:58 +01:00
Author
Owner

@kradalby commented on GitHub (Mar 1, 2022):

Hi, this is a new linter that was added to golangci-lint, I have disabled it in #366 , so should be gone soon, until we have time to fix the complexity.

@kradalby commented on GitHub (Mar 1, 2022): Hi, this is a new linter that was added to `golangci-lint`, I have disabled it in #366 , so should be gone soon, until we have time to fix the complexity.
Author
Owner

@m-tanner-dev0 commented on GitHub (Mar 1, 2022):

great! closing in favor of https://github.com/juanfont/headscale/pull/366

@m-tanner-dev0 commented on GitHub (Mar 1, 2022): great! closing in favor of https://github.com/juanfont/headscale/pull/366
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#144