Preparing report...

Report for github.com/ginuerzh/gost

(v0.0.0-20240613153911-08c54cd8af64)

A+    Excellent!    Found 13 issues across 86 files

Tweet

go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gofmt97%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command


gocyclo86%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • cmd/gost/route.go
    • Line 348: warning: cyclomatic complexity 84 of function (*route).GenRouters() is high (> 15) (gocyclo)
    • Line 95: warning: cyclomatic complexity 62 of function parseChainNode() is high (> 15) (gocyclo)
    • tuntap.go
    • Line 257: warning: cyclomatic complexity 34 of function (*tunHandler).transportTun() is high (> 15) (gocyclo)
    • Line 633: warning: cyclomatic complexity 27 of function (*tapHandler).transportTap() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 17 of function (*tapHandler).Handle() is high (> 15) (gocyclo)
    • Line 150: warning: cyclomatic complexity 17 of function (*tunHandler).Handle() is high (> 15) (gocyclo)
    • chain.go
    • Line 142: warning: cyclomatic complexity 16 of function (*Chain).dialWithOptions() is high (> 15) (gocyclo)
    • selector_test.go
    • Line 68: warning: cyclomatic complexity 16 of function TestFailFilter() is high (> 15) (gocyclo)
    • socks.go
    • Line 1116: warning: cyclomatic complexity 18 of function (*socks5Handler).handleUDPRelay() is high (> 15) (gocyclo)
    • Line 1704: warning: cyclomatic complexity 16 of function (*socks4Handler).handleConnect() is high (> 15) (gocyclo)
    • Line 886: warning: cyclomatic complexity 16 of function (*socks5Handler).handleConnect() is high (> 15) (gocyclo)
    • Line 1235: warning: cyclomatic complexity 16 of function (*socks5Handler).transportUDP() is high (> 15) (gocyclo)
    • node.go
    • Line 40: warning: cyclomatic complexity 34 of function ParseNode() is high (> 15) (gocyclo)
    • http.go
    • Line 140: warning: cyclomatic complexity 33 of function (*httpHandler).handleRequest() is high (> 15) (gocyclo)
    • Line 316: warning: cyclomatic complexity 22 of function (*httpHandler).authenticate() is high (> 15) (gocyclo)
    • resolver.go
    • Line 448: warning: cyclomatic complexity 26 of function (*resolver).Reload() is high (> 15) (gocyclo)
    • http2.go
    • Line 344: warning: cyclomatic complexity 23 of function (*http2Handler).roundTrip() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 23 of function (*http2Handler).authenticate() is high (> 15) (gocyclo)
    • obfs.go
    • Line 352: warning: cyclomatic complexity 21 of function (*obfsTLSParser).Parse() is high (> 15) (gocyclo)
    • relay.go
    • Line 137: warning: cyclomatic complexity 21 of function (*relayHandler).Handle() is high (> 15) (gocyclo)
    • Line 36: warning: cyclomatic complexity 16 of function (*relayConnector).ConnectContext() is high (> 15) (gocyclo)
    • sni.go
    • Line 69: warning: cyclomatic complexity 19 of function (*sniHandler).Handle() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!