Preparing report...

Report for github.com/omec-project/amf

(v1.4.3)

A+    Excellent!    Found 18 issues across 94 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


gocyclo80%

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.

    • gmm/sm.go
    • Line 369: warning: cyclomatic complexity 29 of function ContextSetup() is high (> 15) (gocyclo)
    • Line 73: warning: cyclomatic complexity 25 of function Registered() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 24 of function Authentication() is high (> 15) (gocyclo)
    • Line 249: warning: cyclomatic complexity 24 of function SecurityMode() is high (> 15) (gocyclo)
    • service/init.go
    • Line 179: warning: cyclomatic complexity 20 of function (*AMF).setLogLevel() is high (> 15) (gocyclo)
    • Line 296: warning: cyclomatic complexity 16 of function (*AMF).Start() is high (> 15) (gocyclo)
    • ngap/handler.go
    • Line 34: warning: cyclomatic complexity 132 of function FetchRanUeContext() is high (> 15) (gocyclo)
    • Line 894: warning: cyclomatic complexity 47 of function HandleUEContextReleaseComplete() is high (> 15) (gocyclo)
    • Line 1375: warning: cyclomatic complexity 40 of function HandleInitialUEMessage() is high (> 15) (gocyclo)
    • Line 2977: warning: cyclomatic complexity 40 of function HandlePathSwitchRequest() is high (> 15) (gocyclo)
    • Line 1905: warning: cyclomatic complexity 37 of function HandlePDUSessionResourceNotify() is high (> 15) (gocyclo)
    • Line 3171: warning: cyclomatic complexity 34 of function HandleHandoverRequestAcknowledge() is high (> 15) (gocyclo)
    • Line 2219: warning: cyclomatic complexity 32 of function HandleInitialContextSetupResponse() is high (> 15) (gocyclo)
    • Line 501: warning: cyclomatic complexity 31 of function HandleNGSetupRequest() is high (> 15) (gocyclo)
    • Line 3435: warning: cyclomatic complexity 31 of function HandleHandoverRequired() is high (> 15) (gocyclo)
    • Line 1607: warning: cyclomatic complexity 30 of function HandlePDUSessionResourceSetupResponse() is high (> 15) (gocyclo)
    • Line 2476: warning: cyclomatic complexity 28 of function HandleUEContextReleaseRequest() is high (> 15) (gocyclo)
    • Line 1770: warning: cyclomatic complexity 28 of function HandlePDUSessionResourceModifyResponse() is high (> 15) (gocyclo)
    • Line 1133: warning: cyclomatic complexity 27 of function HandlePDUSessionResourceReleaseResponse() is high (> 15) (gocyclo)
    • Line 4170: warning: cyclomatic complexity 26 of function HandleLocationReport() is high (> 15) (gocyclo)
    • Line 2366: warning: cyclomatic complexity 24 of function HandleInitialContextSetupFailure() is high (> 15) (gocyclo)
    • Line 2617: warning: cyclomatic complexity 23 of function HandleUEContextModificationResponse() is high (> 15) (gocyclo)
    • Line 3872: warning: cyclomatic complexity 23 of function HandleRanConfigurationUpdate() is high (> 15) (gocyclo)
    • Line 745: warning: cyclomatic complexity 22 of function HandleNGReset() is high (> 15) (gocyclo)
    • Line 2079: warning: cyclomatic complexity 22 of function HandlePDUSessionResourceModifyIndication() is high (> 15) (gocyclo)
    • Line 4537: warning: cyclomatic complexity 20 of function HandleCellTrafficTrace() is high (> 15) (gocyclo)
    • Line 2711: warning: cyclomatic complexity 20 of function HandleUEContextModificationFailure() is high (> 15) (gocyclo)
    • Line 4279: warning: cyclomatic complexity 20 of function HandleUERadioCapabilityInfoIndication() is high (> 15) (gocyclo)
    • Line 2874: warning: cyclomatic complexity 19 of function HandleHandoverNotify() is high (> 15) (gocyclo)
    • Line 3631: warning: cyclomatic complexity 18 of function HandleHandoverCancel() is high (> 15) (gocyclo)
    • Line 656: warning: cyclomatic complexity 18 of function HandleUplinkNasTransport() is high (> 15) (gocyclo)
    • Line 2794: warning: cyclomatic complexity 18 of function HandleRRCInactiveTransitionReport() is high (> 15) (gocyclo)
    • Line 4473: warning: cyclomatic complexity 16 of function HandleErrorIndication() is high (> 15) (gocyclo)
    • gmm/handler.go
    • Line 1686: warning: cyclomatic complexity 74 of function HandleServiceRequest() is high (> 15) (gocyclo)
    • Line 756: warning: cyclomatic complexity 73 of function HandleMobilityAndPeriodicRegistrationUpdating() is high (> 15) (gocyclo)
    • Line 89: warning: cyclomatic complexity 38 of function transport5GSMMessage() is high (> 15) (gocyclo)
    • Line 383: warning: cyclomatic complexity 37 of function HandleRegistrationRequest() is high (> 15) (gocyclo)
    • Line 582: warning: cyclomatic complexity 29 of function HandleInitialRegistration() is high (> 15) (gocyclo)
    • Line 1207: warning: cyclomatic complexity 24 of function handleRequestedNssai() is high (> 15) (gocyclo)
    • Line 2360: warning: cyclomatic complexity 21 of function HandleDeregistrationRequest() is high (> 15) (gocyclo)
    • Line 2049: warning: cyclomatic complexity 21 of function HandleAuthenticationResponse() is high (> 15) (gocyclo)
    • Line 1356: warning: cyclomatic complexity 19 of function assignLadnInfo() is high (> 15) (gocyclo)
    • Line 1116: warning: cyclomatic complexity 17 of function communicateWithUDM() is high (> 15) (gocyclo)
    • ngap/dispatcher.go
    • Line 162: warning: cyclomatic complexity 44 of function DispatchNgapMsg() is high (> 15) (gocyclo)
    • Line 26: warning: cyclomatic complexity 16 of function DispatchLb() is high (> 15) (gocyclo)
    • producer/event_exposure.go
    • Line 37: warning: cyclomatic complexity 34 of function CreateAMFEventSubscriptionProcedure() is high (> 15) (gocyclo)
    • Line 321: warning: cyclomatic complexity 20 of function NewAmfEventReport() is high (> 15) (gocyclo)
    • context/amf_ue.go
    • Line 819: warning: cyclomatic complexity 51 of function (*AmfUe).CopyDataFromUeContextModel() is high (> 15) (gocyclo)
    • nas/nas_security/security.go
    • Line 191: warning: cyclomatic complexity 33 of function Decode() is high (> 15) (gocyclo)
    • Line 114: warning: cyclomatic complexity 17 of function FetchUeContextWithMobileIdentity() is high (> 15) (gocyclo)
    • ngap/message/build.go
    • Line 916: warning: cyclomatic complexity 25 of function BuildInitialContextSetupRequest() is high (> 15) (gocyclo)
    • Line 2146: warning: cyclomatic complexity 18 of function BuildPaging() is high (> 15) (gocyclo)
    • gmm/message/build.go
    • Line 450: warning: cyclomatic complexity 23 of function BuildRegistrationAccept() is high (> 15) (gocyclo)
    • Line 655: warning: cyclomatic complexity 21 of function BuildConfigurationUpdateCommand() is high (> 15) (gocyclo)
    • context/ran_ue.go
    • Line 149: warning: cyclomatic complexity 21 of function (*RanUe).UpdateLocation() is high (> 15) (gocyclo)
    • nas/handler.go
    • Line 19: warning: cyclomatic complexity 16 of function HandleNAS() is high (> 15) (gocyclo)
    • producer/callback.go
    • Line 91: warning: cyclomatic complexity 16 of function SmContextStatusNotifyProcedure() 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!