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

Linter Fails #367

Closed
m-tanner-dev0 opened this issue Feb 28, 2022 · 2 comments
Closed

Linter Fails #367

m-tanner-dev0 opened this issue Feb 28, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@m-tanner-dev0
Copy link
Contributor

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.

@m-tanner-dev0 m-tanner-dev0 added the bug Something isn't working label Feb 28, 2022
@kradalby
Copy link
Collaborator

kradalby commented 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.

@m-tanner-dev0
Copy link
Contributor Author

great! closing in favor of #366

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants