Preparing report...

Report for github.com/xamarnath/gogram

(v0.0.0-20240504111542-80dab1dfe734)

A+    Excellent!    Found 17 issues across 75 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!


gofmt100%

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

No problems detected. Good job!


gocyclo78%

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.

    • telegram/media.go
    • Line 42: warning: cyclomatic complexity 32 of function (*Client).UploadFile() is high (> 15) (gocyclo)
    • Line 278: warning: cyclomatic complexity 16 of function (*Uploader).Init() is high (> 15) (gocyclo)
    • handshake.go
    • Line 23: warning: cyclomatic complexity 26 of function (*MTProto).makeAuthKey() is high (> 15) (gocyclo)
    • telegram/auth.go
    • Line 274: warning: cyclomatic complexity 27 of function (*Client).ScrapeAppConfig() is high (> 15) (gocyclo)
    • Line 196: warning: cyclomatic complexity 21 of function codeAuthAttempt() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 17 of function (*Client).Edit2FA() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 16 of function (*Client).Login() is high (> 15) (gocyclo)
    • telegram/utils.go
    • Line 156: warning: cyclomatic complexity 19 of function GetFileLocation() is high (> 15) (gocyclo)
    • Line 340: warning: cyclomatic complexity 19 of function getFileExt() is high (> 15) (gocyclo)
    • Line 432: warning: cyclomatic complexity 16 of function PackBotFileID() is high (> 15) (gocyclo)
    • internal/encoding/tl/encoder.go
    • Line 84: warning: cyclomatic complexity 18 of function (*Encoder).encodeStruct() is high (> 15) (gocyclo)
    • Line 24: warning: cyclomatic complexity 16 of function (*Encoder).encodeValue() is high (> 15) (gocyclo)
    • internal/utils/media.go
    • Line 797: warning: cyclomatic complexity 18 of function (*unmarshaller).unmarshalSlice() is high (> 15) (gocyclo)
    • Line 1006: warning: cyclomatic complexity 17 of function buildField() is high (> 15) (gocyclo)
    • telegram/updates.go
    • Line 392: warning: cyclomatic complexity 41 of function (*messageHandle).runFilterChain() is high (> 15) (gocyclo)
    • Line 21: warning: cyclomatic complexity 28 of function (*Client).removeHandle() is high (> 15) (gocyclo)
    • Line 583: warning: cyclomatic complexity 22 of function HandleIncomingUpdates() is high (> 15) (gocyclo)
    • telegram/helpers.go
    • Line 430: warning: cyclomatic complexity 38 of function (*Client).getSendableMedia() is high (> 15) (gocyclo)
    • Line 103: warning: cyclomatic complexity 33 of function (*Client).getMultiMedia() is high (> 15) (gocyclo)
    • Line 276: warning: cyclomatic complexity 31 of function (*Client).GetSendablePeer() is high (> 15) (gocyclo)
    • Line 562: warning: cyclomatic complexity 21 of function gatherVideoMetadata() is high (> 15) (gocyclo)
    • internal/encoding/tl/decoder.go
    • Line 51: warning: cyclomatic complexity 31 of function (*Decoder).decodeObject() is high (> 15) (gocyclo)
    • Line 290: warning: cyclomatic complexity 24 of function (*Decoder).decodeRegisteredObject() is high (> 15) (gocyclo)
    • mtproto.go
    • Line 506: warning: cyclomatic complexity 28 of function (*MTProto).processResponse() is high (> 15) (gocyclo)
    • Line 408: warning: cyclomatic complexity 17 of function (*MTProto).startReadingResponses() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


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!