Preparing report...

Report for github.com/tailscale/tailscale

A+    Excellent!    Found 143 issues across 402 files

Tweet

gofmt99%

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


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!


gocyclo84%

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.

    • tailscale/ipn/ipnserver/server.go
    • Line 606: warning: cyclomatic complexity 23 of function Run() is high (> 15) (gocyclo)
    • Line 750: warning: cyclomatic complexity 18 of function BabysitProc() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 17 of function isReadonlyConn() is high (> 15) (gocyclo)
    • tailscale/cmd/tailscale/cli/up.go
    • Line 243: warning: cyclomatic complexity 55 of function runUp() is high (> 15) (gocyclo)
    • Line 132: warning: cyclomatic complexity 30 of function prefsFromUpArgs() is high (> 15) (gocyclo)
    • Line 645: warning: cyclomatic complexity 24 of function prefsToFlags() is high (> 15) (gocyclo)
    • tailscale/net/dns/nm.go
    • Line 276: warning: cyclomatic complexity 24 of function (*nmManager).GetBaseConfig() is high (> 15) (gocyclo)
    • Line 73: warning: cyclomatic complexity 21 of function (*nmManager).trySet() is high (> 15) (gocyclo)
    • tailscale/net/dns/manager_windows.go
    • Line 144: warning: cyclomatic complexity 20 of function (windowsManager).setPrimaryDNS() is high (> 15) (gocyclo)
    • Line 329: warning: cyclomatic complexity 16 of function (windowsManager).getBasePrimaryResolver() is high (> 15) (gocyclo)
    • tailscale/derp/derp_test.go
    • Line 226: warning: cyclomatic complexity 29 of function TestSendFreeze() is high (> 15) (gocyclo)
    • Line 55: warning: cyclomatic complexity 26 of function TestSendRecv() is high (> 15) (gocyclo)
    • tailscale/net/netcheck/netcheck.go
    • Line 725: warning: cyclomatic complexity 32 of function (*Client).GetReport() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 25 of function makeProbePlan() is high (> 15) (gocyclo)
    • Line 1156: warning: cyclomatic complexity 19 of function (*Client).nodeAddr() is high (> 15) (gocyclo)
    • Line 1025: warning: cyclomatic complexity 16 of function (*Client).addReportHistoryAndSetPreferredDERP() is high (> 15) (gocyclo)
    • tailscale/wgengine/magicsock/magicsock.go
    • Line 1790: warning: cyclomatic complexity 29 of function (*Conn).handleDiscoMessage() is high (> 15) (gocyclo)
    • Line 1394: warning: cyclomatic complexity 25 of function (*Conn).runDerpReader() is high (> 15) (gocyclo)
    • Line 1213: warning: cyclomatic complexity 20 of function (*Conn).derpWriteChanOfAddr() is high (> 15) (gocyclo)
    • Line 2213: warning: cyclomatic complexity 19 of function (*Conn).SetNetworkMap() is high (> 15) (gocyclo)
    • Line 975: warning: cyclomatic complexity 18 of function (*Conn).determineEndpoints() is high (> 15) (gocyclo)
    • Line 2617: warning: cyclomatic complexity 16 of function (*Conn).bindSocket() is high (> 15) (gocyclo)
    • tailscale/wgengine/userspace.go
    • Line 849: warning: cyclomatic complexity 24 of function (*userspaceEngine).getStatus() is high (> 15) (gocyclo)
    • Line 210: warning: cyclomatic complexity 21 of function NewUserspaceEngine() is high (> 15) (gocyclo)
    • Line 1283: warning: cyclomatic complexity 21 of function (*userspaceEngine).peerForIP() is high (> 15) (gocyclo)
    • Line 735: warning: cyclomatic complexity 17 of function (*userspaceEngine).Reconfig() is high (> 15) (gocyclo)
    • Line 578: warning: cyclomatic complexity 16 of function (*userspaceEngine).maybeReconfigWireguardLocked() is high (> 15) (gocyclo)
    • tailscale/ipn/prefs.go
    • Line 322: warning: cyclomatic complexity 27 of function (*Prefs).Equals() is high (> 15) (gocyclo)
    • Line 259: warning: cyclomatic complexity 19 of function (*Prefs).pretty() is high (> 15) (gocyclo)
    • tailscale/control/controlclient/direct.go
    • Line 572: warning: cyclomatic complexity 58 of function (*Direct).sendMapRequest() is high (> 15) (gocyclo)
    • Line 300: warning: cyclomatic complexity 39 of function (*Direct).doLogin() is high (> 15) (gocyclo)
    • Line 1077: warning: cyclomatic complexity 17 of function ipForwardingBroken() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • tailscale/ipn/handle.go
    • Line 17: warning: exported type Handle should have comment or be unexported (golint)
    • Line 31: warning: exported function NewHandle should have comment or be unexported (golint)
    • Line 46: warning: exported method Handle.SetNotifyCallback should have comment or be unexported (golint)
    • Line 54: warning: exported method Handle.Start should have comment or be unexported (golint)
    • Line 67: warning: exported method Handle.Reset should have comment or be unexported (golint)
    • Line 98: warning: exported method Handle.Prefs should have comment or be unexported (golint)
    • Line 105: warning: exported method Handle.UpdatePrefs should have comment or be unexported (golint)
    • Line 115: warning: exported method Handle.State should have comment or be unexported (golint)
    • Line 122: warning: exported method Handle.EngineStatus should have comment or be unexported (golint)
    • Line 129: warning: exported method Handle.LocalAddrs should have comment or be unexported (golint)
    • Line 140: warning: exported method Handle.NetMap should have comment or be unexported (golint)
    • Line 147: warning: exported method Handle.Expiry should have comment or be unexported (golint)
    • Line 158: warning: exported method Handle.AdminPageURL should have comment or be unexported (golint)
    • Line 162: warning: exported method Handle.StartLoginInteractive should have comment or be unexported (golint)
    • Line 166: warning: exported method Handle.Login should have comment or be unexported (golint)
    • Line 170: warning: exported method Handle.Logout should have comment or be unexported (golint)
    • Line 174: warning: exported method Handle.RequestEngineStatus should have comment or be unexported (golint)
    • Line 178: warning: exported method Handle.FakeExpireAfter should have comment or be unexported (golint)
    • tailscale/net/packet/tsmp.go
    • Line 60: warning: exported method TailscaleRejectedHeader.Flow should have comment or be unexported (golint)
    • Line 68: warning: exported type TSMPType should have comment or be unexported (golint)
    • Line 81: warning: exported type TailscaleRejectReason should have comment or be unexported (golint)
    • Line 119: warning: receiver name h should be consistent with previous receiver name rh for TailscaleRejectedHeader (golint)
    • Line 123: warning: exported method TailscaleRejectedHeader.Len should have comment or be unexported (golint)
    • Line 123: warning: receiver name h should be consistent with previous receiver name rh for TailscaleRejectedHeader (golint)
    • Line 139: warning: exported method TailscaleRejectedHeader.Marshal should have comment or be unexported (golint)
    • Line 139: warning: receiver name h should be consistent with previous receiver name rh for TailscaleRejectedHeader (golint)
    • Line 214: warning: exported method Parsed.AsTSMPPing should have comment or be unexported (golint)
    • Line 226: warning: exported type TSMPPongReply should have comment or be unexported (golint)
    • Line 249: warning: exported method TSMPPongReply.Len should have comment or be unexported (golint)
    • Line 253: warning: exported method TSMPPongReply.Marshal should have comment or be unexported (golint)
    • tailscale/net/packet/packet.go
    • Line 22: warning: exported type TCPFlag should have comment or be unexported (golint)
    • Line 25: warning: exported const TCPFin should have comment (or a comment on this block) or be unexported (golint)
    • Line 81: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 104: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 108: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 231: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 315: warning: exported method Parsed.IP4Header should have comment or be unexported (golint)
    • Line 315: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 328: warning: exported method Parsed.IP6Header should have comment or be unexported (golint)
    • Line 328: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 341: warning: exported method Parsed.ICMP4Header should have comment or be unexported (golint)
    • Line 341: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 352: warning: exported method Parsed.UDP4Header should have comment or be unexported (golint)
    • Line 352: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 365: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 371: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 377: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 382: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 402: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 413: warning: comment on exported method Parsed.IsEchoResponse should be of the form "IsEchoResponse ..." (golint)
    • Line 414: warning: receiver name q should be consistent with previous receiver name p for Parsed (golint)
    • Line 425: warning: exported function Hexdump should have comment or be unexported (golint)
    • tailscale/types/wgkey/key.go
    • Line 42: warning: exported function Parse should have comment or be unexported (golint)
    • Line 44: warning: exported function ParseHex should have comment or be unexported (golint)
    • Line 58: warning: exported function ParsePrivateHex should have comment or be unexported (golint)
    • Line 74: warning: exported method Key.Base64 should have comment or be unexported (golint)
    • Line 76: warning: exported method Key.HexString should have comment or be unexported (golint)
    • Line 77: warning: exported method Key.Equal should have comment or be unexported (golint)
    • Line 78: warning: exported method Key.AppendTo should have comment or be unexported (golint)
    • Line 80: warning: exported method Key.ShortString should have comment or be unexported (golint)
    • Line 93: warning: exported method Key.IsZero should have comment or be unexported (golint)
    • Line 101: warning: exported method Key.MarshalJSON should have comment or be unexported (golint)
    • Line 109: warning: exported method Key.UnmarshalJSON should have comment or be unexported (golint)
    • Line 124: warning: exported method Key.LessThan should have comment or be unexported (golint)
    • Line 124: warning: receiver name a should be consistent with previous receiver name k for Key (golint)
    • Line 151: warning: exported function ParsePrivate should have comment or be unexported (golint)
    • Line 157: warning: exported method Private.HexString should have comment or be unexported (golint)
    • Line 158: warning: exported method Private.Equal should have comment or be unexported (golint)
    • Line 160: warning: exported method Private.IsZero should have comment or be unexported (golint)
    • Line 189: warning: exported method Private.MarshalText should have comment or be unexported (golint)
    • Line 190: warning: exported method Private.AppendTo should have comment or be unexported (golint)
    • Line 192: warning: exported method Private.UnmarshalText should have comment or be unexported (golint)
    • Line 219: warning: exported function ParseSymmetric should have comment or be unexported (golint)
    • Line 227: warning: exported function ParseSymmetricHex should have comment or be unexported (golint)
    • Line 244: warning: exported method Symmetric.Base64 should have comment or be unexported (golint)
    • Line 246: warning: exported method Symmetric.HexString should have comment or be unexported (golint)
    • Line 247: warning: exported method Symmetric.IsZero should have comment or be unexported (golint)
    • Line 248: warning: exported method Symmetric.Equal should have comment or be unexported (golint)
    • tailscale/net/dns/manager.go
    • Line 42: warning: comment on exported function NewManager should be of the form "NewManager ..." (golint)
    • Line 54: warning: exported method Manager.Set should have comment or be unexported (golint)
    • Line 187: warning: exported method Manager.EnqueueRequest should have comment or be unexported (golint)
    • Line 191: warning: exported method Manager.NextResponse should have comment or be unexported (golint)
    • Line 195: warning: exported method Manager.Down should have comment or be unexported (golint)
    • tailscale/net/packet/icmp6.go
    • Line 17: warning: exported const ICMP6Unreachable should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported const ICMP6NoCode should have comment (or a comment on this block) or be unexported (golint)
    • tailscale/net/dns/osconfig.go
    • Line 55: warning: exported method OSConfig.IsZero should have comment or be unexported (golint)
    • Line 59: warning: exported method OSConfig.Equal should have comment or be unexported (golint)
    • Line 59: warning: receiver name a should be consistent with previous receiver name o for OSConfig (golint)
    • tailscale/wgengine/magicsock/legacy.go
    • Line 407: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 424: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 427: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 430: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 433: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 434: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 435: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 439: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • Line 512: warning: receiver name a should be consistent with previous receiver name as for addrSet (golint)
    • tailscale/wgengine/magicsock/magicsock.go
    • Line 510: warning: exported method Conn.Start should have comment or be unexported (golint)
    • Line 795: warning: exported method Conn.SetNetInfoCallback should have comment or be unexported (golint)
    • Line 1106: warning: exported method Conn.Send should have comment or be unexported (golint)
    • Line 2082: warning: exported method Conn.SetNetworkUp should have comment or be unexported (golint)
    • Line 2845: warning: exported method RebindingUDPConn.LocalAddr should have comment or be unexported (golint)
    • Line 2859: warning: exported method RebindingUDPConn.Close should have comment or be unexported (golint)
    • Line 2872: warning: exported method RebindingUDPConn.WriteTo should have comment or be unexported (golint)
    • Line 2988: warning: exported method Conn.UpdateStatus should have comment or be unexported (golint)
    • tailscale/ipn/ipnstate/ipnstate.go
    • Line 52: warning: exported method Status.Peers should have comment or be unexported (golint)
    • Line 61: warning: exported type PeerStatusLite should have comment or be unexported (golint)
    • Line 67: warning: exported type PeerStatus should have comment or be unexported (golint)
    • Line 114: warning: exported type StatusBuilder should have comment or be unexported (golint)
    • Line 132: warning: exported method StatusBuilder.Status should have comment or be unexported (golint)
    • Line 170: warning: comment on exported method StatusBuilder.AddTailscaleIP should be of the form "AddTailscaleIP ..." (golint)
    • Line 275: warning: exported type StatusUpdater should have comment or be unexported (golint)
    • Line 279: warning: exported method Status.WriteHTML should have comment or be unexported (golint)
    • Line 279: warning: receiver name st should be consistent with previous receiver name s for Status (golint)
    • Line 442: warning: exported function SortPeers should have comment or be unexported (golint)
    • tailscale/ipn/prefs.go
    • Line 229: warning: exported method MaskedPrefs.Pretty should have comment or be unexported (golint)
    • Line 258: warning: exported method Prefs.Pretty should have comment or be unexported (golint)
    • Line 314: warning: exported method Prefs.ToBytes should have comment or be unexported (golint)
    • Line 322: warning: exported method Prefs.Equals should have comment or be unexported (golint)
    • Line 456: warning: exported function SavePrefs should have comment or be unexported (golint)
    • tailscale/control/controlclient/auto.go
    • Line 24: warning: exported type LoginGoal should have comment or be unexported (golint)
    • Line 523: warning: exported method Auto.AuthCantContinue should have comment or be unexported (golint)
    • Line 540: warning: exported method Auto.SetHostinfo should have comment or be unexported (golint)
    • Line 553: warning: exported method Auto.SetNetInfo should have comment or be unexported (golint)
    • Line 615: warning: exported method Auto.Login should have comment or be unexported (golint)
    • Line 629: warning: exported method Auto.StartLogout should have comment or be unexported (golint)
    • Line 640: warning: exported method Auto.Logout should have comment or be unexported (golint)
    • Line 679: warning: exported method Auto.Shutdown should have comment or be unexported (golint)
    • Line 703: warning: comment on exported method Auto.TestOnlyNodePublicKey should be of the form "TestOnlyNodePublicKey ..." (golint)
    • Line 710: warning: exported method Auto.TestOnlySetAuthKey should have comment or be unexported (golint)
    • Line 716: warning: exported method Auto.TestOnlyTimeNow should have comment or be unexported (golint)
    • tailscale/control/controlclient/status.go
    • Line 35: warning: exported const StateNew should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported method State.MarshalText should have comment or be unexported (golint)
    • Line 66: warning: exported type Status should have comment or be unexported (golint)
    • tailscale/syncs/syncs.go
    • Line 74: warning: exported method AtomicBool.Set should have comment or be unexported (golint)
    • Line 82: warning: exported method AtomicBool.Get should have comment or be unexported (golint)
    • tailscale/net/tshttpproxy/tshttpproxy.go
    • Line 44: warning: exported function ProxyFromEnvironment should have comment or be unexported (golint)
    • Line 92: warning: comment on exported function SetTransportGetProxyConnectHeader should be of the form "SetTransportGetProxyConnectHeader ..." (golint)
    • tailscale/portlist/portlist.go
    • Line 66: warning: receiver name pl should be consistent with previous receiver name a for List (golint)
    • Line 75: warning: exported function GetList should have comment or be unexported (golint)
    • tailscale/ipn/backend.go
    • Line 19: warning: exported type State should have comment or be unexported (golint)
    • Line 22: warning: exported const NoState should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: comment on exported const GoogleIDTokenType should be of the form "GoogleIDTokenType ..." (golint)
    • Line 176: warning: exported type Options should have comment or be unexported (golint)
    • tailscale/derp/derp_server.go
    • Line 198: warning: comment on exported method Server.SetMeshKey should be of the form "SetMeshKey ..." (golint)
    • Line 1299: warning: exported method Server.ConsistencyCheck should have comment or be unexported (golint)
    • tailscale/logtail/id.go
    • Line 19: warning: comment on exported function NewPrivateID should be of the form "NewPrivateID ..." (golint)
    • Line 33: warning: exported method PrivateID.MarshalText should have comment or be unexported (golint)
    • Line 61: warning: exported method PrivateID.UnmarshalText should have comment or be unexported (golint)
    • Line 81: warning: exported method PrivateID.Public should have comment or be unexported (golint)
    • Line 115: warning: exported method PublicID.MarshalText should have comment or be unexported (golint)
    • Line 123: warning: exported method PublicID.UnmarshalText should have comment or be unexported (golint)
    • tailscale/util/dnsname/dnsname.go
    • Line 23: warning: exported function ToFQDN should have comment or be unexported (golint)
    • Line 79: warning: exported method FQDN.NumLabels should have comment or be unexported (golint)
    • Line 86: warning: exported method FQDN.Contains should have comment or be unexported (golint)
    • Line 224: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • tailscale/tstest/natlab/nat.go
    • Line 131: warning: exported method SNAT44.HandleOut should have comment or be unexported (golint)
    • Line 139: warning: exported method SNAT44.HandleIn should have comment or be unexported (golint)
    • Line 171: warning: exported method SNAT44.HandleForward should have comment or be unexported (golint)
    • tailscale/wgengine/bench/trafficgen.go
    • Line 19: warning: exported type Snapshot should have comment or be unexported (golint)
    • Line 30: warning: exported type Delta should have comment or be unexported (golint)
    • Line 39: warning: exported method Snapshot.Sub should have comment or be unexported (golint)
    • Line 60: warning: exported type TrafficGen should have comment or be unexported (golint)
    • Line 122: warning: exported method TrafficGen.Snap should have comment or be unexported (golint)
    • Line 130: warning: exported method TrafficGen.Running should have comment or be unexported (golint)
    • tailscale/net/stun/stun.go
    • Line 5: warning: package comment should be of the form "Package stun ..." (golint)
    • Line 124: warning: exported var ErrNotSTUN should have comment or be unexported (golint)
    • tailscale/net/portmapper/portmapper.go
    • Line 126: warning: exported method Client.Close should have comment or be unexported (golint)
    • Line 240: warning: exported var ErrNoPortMappingServices should have comment or be unexported (golint)
    • Line 436: warning: exported type ProbeResult should have comment or be unexported (golint)
    • tailscale/types/key/key.go
    • Line 22: warning: comment on exported method Private.IsZero should be of the form "IsZero ..." (golint)
    • Line 39: warning: receiver name k should be consistent with previous receiver name p for Private (golint)
    • Line 44: warning: comment on exported method Public.IsZero should be of the form "IsZero ..." (golint)
    • Line 54: warning: exported method Public.MarshalText should have comment or be unexported (golint)
    • Line 60: warning: exported method Public.UnmarshalText should have comment or be unexported (golint)
    • Line 77: warning: receiver name k should be consistent with previous receiver name p for Public (golint)
    • Line 79: warning: exported method Private.Public should have comment or be unexported (golint)
    • Line 79: warning: receiver name k should be consistent with previous receiver name p for Private (golint)
    • Line 85: warning: exported method Private.SharedSecret should have comment or be unexported (golint)
    • Line 85: warning: receiver name k should be consistent with previous receiver name p for Private (golint)
    • tailscale/ipn/message.go
    • Line 44: warning: exported type NoArgs should have comment or be unexported (golint)
    • Line 46: warning: exported type StartArgs should have comment or be unexported (golint)
    • Line 50: warning: exported type SetPrefsArgs should have comment or be unexported (golint)
    • Line 54: warning: exported type FakeExpireAfterArgs should have comment or be unexported (golint)
    • Line 58: warning: exported type PingArgs should have comment or be unexported (golint)
    • Line 89: warning: exported type BackendServer should have comment or be unexported (golint)
    • Line 123: warning: exported method BackendServer.SendErrorMessage should have comment or be unexported (golint)
    • Line 155: warning: exported method BackendServer.GotCommand should have comment or be unexported (golint)
    • Line 214: warning: exported type BackendClient should have comment or be unexported (golint)
    • Line 224: warning: exported function NewBackendClient should have comment or be unexported (golint)
    • Line 231: warning: exported method BackendClient.GotNotifyMsg should have comment or be unexported (golint)
    • Line 271: warning: exported method BackendClient.SetNotifyCallback should have comment or be unexported (golint)
    • Line 275: warning: exported method BackendClient.Quit should have comment or be unexported (golint)
    • Line 280: warning: exported method BackendClient.Start should have comment or be unexported (golint)
    • Line 285: warning: exported method BackendClient.StartLoginInteractive should have comment or be unexported (golint)
    • Line 289: warning: exported method BackendClient.Login should have comment or be unexported (golint)
    • Line 293: warning: exported method BackendClient.Logout should have comment or be unexported (golint)
    • Line 297: warning: exported method BackendClient.SetPrefs should have comment or be unexported (golint)
    • Line 301: warning: exported method BackendClient.RequestEngineStatus should have comment or be unexported (golint)
    • Line 305: warning: exported method BackendClient.RequestStatus should have comment or be unexported (golint)
    • Line 309: warning: exported method BackendClient.FakeExpireAfter should have comment or be unexported (golint)
    • Line 313: warning: exported method BackendClient.Ping should have comment or be unexported (golint)
    • Line 323: warning: comment on exported function ReadMsg should be of the form "ReadMsg ..." (golint)
    • Line 346: warning: comment on exported function WriteMsg should be of the form "WriteMsg ..." (golint)
    • tailscale/wgengine/filter/filter.go
    • Line 62: warning: exported const Drop should have comment (or a comment on this block) or be unexported (golint)
    • Line 83: warning: exported method Response.IsDrop should have comment or be unexported (golint)
    • Line 91: warning: exported const LogDrops should have comment (or a comment on this block) or be unexported (golint)
    • tailscale/net/interfaces/interfaces.go
    • Line 145: warning: exported method Interface.IsLoopback should have comment or be unexported (golint)
    • Line 146: warning: exported method Interface.IsUp should have comment or be unexported (golint)
    • Line 361: warning: exported method State.HasPAC should have comment or be unexported (golint)
    • tailscale/wgengine/netstack/netstack.go
    • Line 141: warning: comment on exported method Impl.Start should be of the form "Start ..." (golint)
    • Line 177: warning: exported function DNSMapFromNetworkMap should have comment or be unexported (golint)
    • Line 341: warning: exported method Impl.DialContextTCP should have comment or be unexported (golint)
    • tailscale/derp/derp_client.go
    • Line 75: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 221: warning: exported method Client.ForwardPacket should have comment or be unexported (golint)
    • Line 255: warning: exported method Client.SendPong should have comment or be unexported (golint)
    • tailscale/control/controlclient/direct.go
    • Line 83: warning: exported type Options should have comment or be unexported (golint)
    • Line 108: warning: exported type Decompressor should have comment or be unexported (golint)
    • Line 179: warning: exported function NewHostinfo should have comment or be unexported (golint)
    • Line 248: warning: exported method Direct.GetPersist should have comment or be unexported (golint)
    • Line 254: warning: exported method Direct.TryLogout should have comment or be unexported (golint)
    • Line 267: warning: exported method Direct.TryLogin should have comment or be unexported (golint)
    • tailscale/version/version.go
    • Line 25: warning: comment on exported const GitCommit should be of the form "GitCommit ..." (golint)
    • Line 31: warning: comment on exported const ExtraGitCommit should be of the form "ExtraGitCommit ..." (golint)
    • tailscale/tstest/log.go
    • Line 28: warning: exported function FixLogs should have comment or be unexported (golint)
    • Line 33: warning: exported function UnfixLogs should have comment or be unexported (golint)
    • tailscale/client/tailscale/tailscale.go
    • Line 143: warning: comment on exported function StatusWithoutPeers should be of the form "StatusWithoutPeers ..." (golint)
    • Line 160: warning: exported function WaitingFiles should have comment or be unexported (golint)
    • Line 172: warning: exported function DeleteWaitingFile should have comment or be unexported (golint)
    • Line 177: warning: exported function GetWaitingFile should have comment or be unexported (golint)
    • Line 198: warning: exported function FileTargets should have comment or be unexported (golint)
    • Line 210: warning: exported function CheckIPForwarding should have comment or be unexported (golint)
    • Line 227: warning: exported function GetPrefs should have comment or be unexported (golint)
    • Line 239: warning: exported function EditPrefs should have comment or be unexported (golint)
    • Line 255: warning: exported function Logout should have comment or be unexported (golint)
    • tailscale/disco/disco.go
    • Line 39: warning: exported type MessageType should have comment or be unexported (golint)
    • Line 42: warning: exported const TypePing should have comment (or a comment on this block) or be unexported (golint)
    • Line 98: warning: exported type Ping should have comment or be unexported (golint)
    • Line 102: warning: exported method Ping.AppendMarshal should have comment or be unexported (golint)
    • Line 147: warning: exported method CallMeMaybe.AppendMarshal should have comment or be unexported (golint)
    • Line 186: warning: exported method Pong.AppendMarshal should have comment or be unexported (golint)
    • tailscale/logtail/buffer.go
    • Line 14: warning: exported type Buffer should have comment or be unexported (golint)
    • Line 27: warning: exported function NewMemoryBuffer should have comment or be unexported (golint)
    • tailscale/net/tstun/wrap.go
    • Line 128: warning: exported function Wrap should have comment or be unexported (golint)
    • Line 160: warning: exported method Wrapper.Close should have comment or be unexported (golint)
    • Line 217: warning: exported method Wrapper.File should have comment or be unexported (golint)
    • Line 221: warning: exported method Wrapper.Flush should have comment or be unexported (golint)
    • Line 225: warning: exported method Wrapper.MTU should have comment or be unexported (golint)
    • Line 229: warning: exported method Wrapper.Name should have comment or be unexported (golint)
    • Line 482: warning: exported method Wrapper.GetFilter should have comment or be unexported (golint)
    • Line 487: warning: exported method Wrapper.SetFilter should have comment or be unexported (golint)
    • tailscale/health/health.go
    • Line 104: warning: exported function NetworkCategoryHealth should have comment or be unexported (golint)
    • Line 187: warning: exported function SetDERPRegionConnectedState should have comment or be unexported (golint)
    • Line 194: warning: exported function NoteDERPRegionReceivedFrame should have comment or be unexported (golint)
    • Line 201: warning: comment on exported function SetIPNState should be of the form "SetIPNState ..." (golint)
    • Line 299: warning: exported var ReceiveIPv4 should have comment or be unexported (golint)
    • Line 324: warning: exported method ReceiveFuncStats.Enter should have comment or be unexported (golint)
    • Line 329: warning: exported method ReceiveFuncStats.Exit should have comment or be unexported (golint)
    • tailscale/wgengine/bench/bench.go
    • Line 24: warning: exported const PayloadSize should have comment or be unexported (golint)
    • Line 25: warning: exported const ICMPMinSize should have comment or be unexported (golint)
    • Line 27: warning: exported var Addr1 should have comment or be unexported (golint)
    • Line 28: warning: exported var Addr2 should have comment or be unexported (golint)
    • tailscale/net/packet/icmp4.go
    • Line 23: warning: exported const ICMP4EchoReply should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported const ICMP4NoCode should have comment (or a comment on this block) or be unexported (golint)
    • tailscale/tailcfg/tailcfg.go
    • Line 47: warning: exported type StableID should have comment or be unexported (golint)
    • Line 49: warning: exported type ID should have comment or be unexported (golint)
    • Line 51: warning: exported type UserID should have comment or be unexported (golint)
    • Line 53: warning: exported method UserID.IsZero should have comment or be unexported (golint)
    • Line 57: warning: exported type LoginID should have comment or be unexported (golint)
    • Line 59: warning: exported method LoginID.IsZero should have comment or be unexported (golint)
    • Line 63: warning: exported type NodeID should have comment or be unexported (golint)
    • Line 65: warning: exported method NodeID.IsZero should have comment or be unexported (golint)
    • Line 69: warning: exported type StableNodeID should have comment or be unexported (golint)
    • Line 71: warning: exported method StableNodeID.IsZero should have comment or be unexported (golint)
    • Line 106: warning: exported type Login should have comment or be unexported (golint)
    • Line 140: warning: exported type Node should have comment or be unexported (golint)
    • Line 217: warning: comment on exported method Node.DisplayNames should be of the form "DisplayNames ..." (golint)
    • Line 271: warning: exported type MachineStatus should have comment or be unexported (golint)
    • Line 274: warning: exported const MachineUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 280: warning: exported method MachineStatus.MarshalText should have comment or be unexported (golint)
    • Line 284: warning: exported method MachineStatus.UnmarshalText should have comment or be unexported (golint)
    • Line 371: warning: exported type ServiceProto should have comment or be unexported (golint)
    • Line 374: warning: exported const TCP should have comment (or a comment on this block) or be unexported (golint)
    • Line 378: warning: exported type Service should have comment or be unexported (golint)
    • Line 559: warning: exported method SignatureType.MarshalText should have comment or be unexported (golint)
    • Line 563: warning: exported method SignatureType.UnmarshalText should have comment or be unexported (golint)
    • Line 657: warning: exported const EndpointUnknownType should have comment (or a comment on this block) or be unexported (golint)
    • Line 760: warning: exported var PortRangeAny should have comment or be unexported (golint)
    • Line 814: warning: exported var FilterAllowAll should have comment or be unexported (golint)
    • Line 889: warning: exported type MapResponse should have comment or be unexported (golint)
    • Line 1025: warning: exported method MachineKey.MarshalText should have comment or be unexported (golint)
    • Line 1026: warning: exported method MachineKey.HexString should have comment or be unexported (golint)
    • Line 1027: warning: exported method MachineKey.UnmarshalText should have comment or be unexported (golint)
    • Line 1053: warning: exported method NodeKey.ShortString should have comment or be unexported (golint)
    • Line 1056: warning: exported method NodeKey.MarshalText should have comment or be unexported (golint)
    • Line 1057: warning: exported method NodeKey.UnmarshalText should have comment or be unexported (golint)
    • Line 1066: warning: exported method DiscoKey.MarshalText should have comment or be unexported (golint)
    • Line 1067: warning: exported method DiscoKey.UnmarshalText should have comment or be unexported (golint)
    • Line 1068: warning: exported method DiscoKey.ShortString should have comment or be unexported (golint)
    • Line 1069: warning: exported method DiscoKey.AppendTo should have comment or be unexported (golint)
    • Line 1075: warning: receiver name id should be consistent with previous receiver name u for UserID (golint)
    • Line 1076: warning: receiver name id should be consistent with previous receiver name u for LoginID (golint)
    • Line 1077: warning: receiver name id should be consistent with previous receiver name u for NodeID (golint)
    • Line 1174: warning: exported const CapabilityFileSharing should have comment (or a comment on this block) or be unexported (golint)
    • tailscale/net/netcheck/netcheck.go
    • Line 71: warning: exported type Report should have comment or be unexported (golint)
    • Line 104: warning: exported method Report.Clone should have comment or be unexported (golint)
    • Line 222: warning: exported method Client.ReceiveSTUNPacket should have comment or be unexported (golint)
    • tailscale/tstest/natlab/natlab.go
    • Line 72: warning: exported method Packet.Trace should have comment or be unexported (golint)
    • Line 103: warning: exported type Network should have comment or be unexported (golint)
    • Line 115: warning: exported method Network.SetDefaultGateway should have comment or be unexported (golint)
    • Line 213: warning: exported type Interface should have comment or be unexported (golint)
    • Line 220: warning: exported method Interface.Machine should have comment or be unexported (golint)
    • Line 224: warning: exported method Interface.Network should have comment or be unexported (golint)
    • Line 658: warning: exported method Machine.AddNetwork should have comment or be unexported (golint)
    • Line 660: warning: exported method Machine.ListenPacket should have comment or be unexported (golint)
    • tailscale/wgengine/router/router_linux_test.go
    • Line 403: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 421: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 432: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 457: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • tailscale/logtail/logtail.go
    • Line 31: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 36: warning: exported type Config should have comment or be unexported (golint)
    • Line 54: warning: exported function NewLogger should have comment or be unexported (golint)
    • tailscale/logtail/filch/filch.go
    • Line 21: warning: exported type Options should have comment or be unexported (golint)
    • Line 36: warning: comment on exported method Filch.TryReadLine should be of the form "TryReadLine ..." (golint)
    • tailscale/ipn/ipnlocal/local.go
    • Line 617: warning: exported method LocalBackend.SetNotifyCallback should have comment or be unexported (golint)
    • Line 1357: warning: exported method LocalBackend.InServerMode should have comment or be unexported (golint)
    • Line 1425: warning: exported method LocalBackend.Ping should have comment or be unexported (golint)
    • Line 1481: warning: exported method LocalBackend.SetCurrentUserID should have comment or be unexported (golint)
    • Line 1487: warning: exported method LocalBackend.EditPrefs should have comment or be unexported (golint)
    • Line 2254: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 2336: warning: exported method LocalBackend.LogoutSync should have comment or be unexported (golint)
    • Line 2501: warning: exported method LocalBackend.WaitingFiles should have comment or be unexported (golint)
    • Line 2511: warning: exported method LocalBackend.DeleteFile should have comment or be unexported (golint)
    • Line 2521: warning: exported method LocalBackend.OpenFile should have comment or be unexported (golint)
    • Line 2637: warning: exported method LocalBackend.CheckIPForwarding should have comment or be unexported (golint)
    • tailscale/net/stun/stuntest/stuntest.go
    • Line 29: warning: exported function Serve should have comment or be unexported (golint)
    • Line 33: warning: exported function ServeWithPacketListener should have comment or be unexported (golint)
    • Line 94: warning: exported function DERPMapOf should have comment or be unexported (golint)
    • tailscale/types/ipproto/ipproto.go
    • Line 23: warning: comment on exported const ICMPv4 should be of the form "ICMPv4 ..." (golint)
    • Line 25: warning: exported const IGMP should have comment (or a comment on this block) or be unexported (golint)
    • tailscale/tstest/natlab/firewall.go
    • Line 110: warning: exported method Firewall.HandleOut should have comment or be unexported (golint)
    • Line 121: warning: exported method Firewall.HandleIn should have comment or be unexported (golint)
    • Line 138: warning: exported method Firewall.HandleForward should have comment or be unexported (golint)
    • tailscale/derp/derphttp/derphttp_client.go
    • Line 431: warning: exported method Client.DialRegionTLS should have comment or be unexported (golint)
    • Line 628: warning: exported method Client.Send should have comment or be unexported (golint)
    • Line 639: warning: exported method Client.ForwardPacket should have comment or be unexported (golint)
    • Line 802: warning: exported var ErrClientClosed should have comment or be unexported (golint)
    • tailscale/types/netmap/netmap.go
    • Line 80: warning: exported method NetworkMap.Concise should have comment or be unexported (golint)
    • Line 119: warning: receiver name a should be consistent with previous receiver name nm for NetworkMap (golint)
    • Line 188: warning: exported method NetworkMap.ConciseDiffFrom should have comment or be unexported (golint)
    • Line 188: warning: receiver name b should be consistent with previous receiver name nm for NetworkMap (golint)
    • Line 235: warning: exported method NetworkMap.JSON should have comment or be unexported (golint)
    • Line 248: warning: exported const AllowSingleHosts should have comment (or a comment on this block) or be unexported (golint)
    • tailscale/tsweb/tsweb.go
    • Line 19: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 61: warning: exported function DefaultCertDir should have comment or be unexported (golint)
    • Line 126: warning: exported function Uptime should have comment or be unexported (golint)
    • Line 175: warning: exported type HandlerOptions should have comment or be unexported (golint)
    • tailscale/types/opt/bool.go
    • Line 18: warning: exported method Bool.Set should have comment or be unexported (golint)
    • Line 22: warning: exported method Bool.Clear should have comment or be unexported (golint)
    • Line 24: warning: exported method Bool.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Bool.MarshalJSON should have comment or be unexported (golint)
    • Line 57: warning: exported method Bool.UnmarshalJSON should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words