Preparing report...

Report for github.com/free5gc/free5gc

A+    Excellent!    Found 13 issues across 20 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!


gocyclo85%

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.


golint35%

Golint is a linter for Go source code.

    • free5gc/test/ngapTestpacket/build.go
    • Line 1: warning: don't use MixedCaps in package name; ngapTestpacket should be ngaptestpacket (golint)
    • Line 13: warning: comment on exported var TestPlmn should be of the form "TestPlmn ..." (golint)
    • Line 20: warning: exported function BuildNGSetupRequest should have comment or be unexported (golint)
    • Line 117: warning: exported function BuildNGReset should have comment or be unexported (golint)
    • Line 169: warning: exported function BuildNGResetAcknowledge should have comment or be unexported (golint)
    • Line 211: warning: exported function BuildInitialUEMessage should have comment or be unexported (golint)
    • Line 334: warning: exported function BuildErrorIndication should have comment or be unexported (golint)
    • Line 410: warning: exported function BuildUEContextReleaseRequest should have comment or be unexported (golint)
    • Line 485: warning: exported function BuildUEContextReleaseComplete should have comment or be unexported (golint)
    • Line 572: warning: exported function BuildUEContextModificationResponse should have comment or be unexported (golint)
    • Line 652: warning: exported function BuildUplinkNasTransport should have comment or be unexported (golint)
    • Line 730: warning: exported function BuildInitialContextSetupResponse should have comment or be unexported (golint)
    • Line 803: warning: exported function BuildInitialContextSetupFailure should have comment or be unexported (golint)
    • Line 879: warning: exported function BuildPathSwitchRequest should have comment or be unexported (golint)
    • Line 1010: warning: exported function BuildHandoverRequestAcknowledge should have comment or be unexported (golint)
    • Line 1103: warning: exported function BuildHandoverFailure should have comment or be unexported (golint)
    • Line 1148: warning: exported function BuildPDUSessionResourceReleaseResponse should have comment or be unexported (golint)
    • Line 1233: warning: exported function BuildAMFConfigurationUpdateFailure should have comment or be unexported (golint)
    • Line 1270: warning: exported function BuildUERadioCapabilityCheckRequest should have comment or be unexported (golint)
    • Line 1326: warning: exported function BuildUERadioCapabilityCheckResponse should have comment or be unexported (golint)
    • Line 1382: warning: exported function BuildHandoverCancel should have comment or be unexported (golint)
    • Line 1437: warning: exported function BuildLocationReportingFailureIndication should have comment or be unexported (golint)
    • Line 1492: warning: exported function BuildPDUSessionResourceSetupResponse should have comment or be unexported (golint)
    • Line 1574: warning: exported function BuildPDUSessionResourceSetupResponseForPaging should have comment or be unexported (golint)
    • Line 1644: warning: exported function BuildPDUSessionResourceModifyResponse should have comment or be unexported (golint)
    • Line 1752: warning: exported function BuildPDUSessionResourceNotify should have comment or be unexported (golint)
    • Line 1853: warning: exported function BuildPDUSessionResourceModifyIndication should have comment or be unexported (golint)
    • Line 1915: warning: exported function BuildUEContextModificationFailure should have comment or be unexported (golint)
    • Line 1972: warning: exported function BuildRRCInactiveTransitionReport should have comment or be unexported (golint)
    • Line 2071: warning: exported function BuildHandoverNotify should have comment or be unexported (golint)
    • Line 2136: warning: exported function BuildUplinkRanStatusTransfer should have comment or be unexported (golint)
    • Line 2209: warning: exported function BuildNasNonDeliveryIndication should have comment or be unexported (golint)
    • Line 2276: warning: exported function BuildRanConfigurationUpdate should have comment or be unexported (golint)
    • Line 2346: warning: exported function BuildRanConfigurationUpdateAck should have comment or be unexported (golint)
    • Line 2377: warning: exported function BuildRanConfigurationUpdateFailure should have comment or be unexported (golint)
    • Line 2439: warning: exported function BuildAMFStatusIndication should have comment or be unexported (golint)
    • Line 2443: warning: exported function BuildUplinkRanConfigurationTransfer should have comment or be unexported (golint)
    • Line 2524: warning: exported function BuildUplinkUEAssociatedNRPPATransport should have comment or be unexported (golint)
    • Line 2590: warning: exported function BuildUplinkNonUEAssociatedNRPPATransport should have comment or be unexported (golint)
    • Line 2629: warning: exported function BuildLocationReport should have comment or be unexported (golint)
    • Line 2773: warning: exported function BuildUETNLABindingReleaseRequest should have comment or be unexported (golint)
    • Line 2777: warning: exported function BuildUERadioCapabilityInfoIndication should have comment or be unexported (golint)
    • Line 2832: warning: exported function BuildAMFConfigurationUpdateAcknowledge should have comment or be unexported (golint)
    • Line 2899: warning: exported function BuildAMFConfigurationUpdate should have comment or be unexported (golint)
    • Line 3011: warning: exported function BuildHandoverRequired should have comment or be unexported (golint)
    • Line 3145: warning: exported function BuildCellTrafficTrace should have comment or be unexported (golint)
    • Line 3520: warning: exported function GetPDUSessionResourceSetupResponseTransfer should have comment or be unexported (golint)
    • Line 3529: warning: exported function GetPDUSessionResourceModifyResponseTransfer should have comment or be unexported (golint)
    • Line 3538: warning: exported function GetPDUSessionResourceSetupUnsucessfulTransfer should have comment or be unexported (golint)
    • Line 3547: warning: exported function GetPDUSessionResourceModifyUnsuccessfulTransfer should have comment or be unexported (golint)
    • Line 3556: warning: exported function GetPDUSessionResourceModifyConfirmTransfer should have comment or be unexported (golint)
    • Line 3565: warning: exported function GetPDUSessionResourceModifyIndicationUnsuccessfulTransfer should have comment or be unexported (golint)
    • Line 3575: warning: exported function GetPDUSessionResourceReleaseCommandTransfer should have comment or be unexported (golint)
    • Line 3584: warning: exported function GetPathSwitchRequestTransfer should have comment or be unexported (golint)
    • Line 3593: warning: exported function GetPathSwitchRequestSetupFailedTransfer should have comment or be unexported (golint)
    • Line 3602: warning: exported function GetPDUSessionResourceModifyIndicationTransfer should have comment or be unexported (golint)
    • Line 3611: warning: exported function GetPDUSessionResourceReleaseResponseTransfer should have comment or be unexported (golint)
    • Line 3620: warning: exported function GetPDUSessionResourceNotifyTransfer should have comment or be unexported (golint)
    • Line 3628: warning: exported function GetPDUSessionResourceNotifyReleasedTransfer should have comment or be unexported (golint)
    • Line 3637: warning: exported function GetHandoverRequestAcknowledgeTransfer should have comment or be unexported (golint)
    • Line 3646: warning: exported function GetHandoverResourceAllocationUnsuccessfulTransfer should have comment or be unexported (golint)
    • Line 3655: warning: exported function GetHandoverRequiredTransfer should have comment or be unexported (golint)
    • Line 3664: warning: exported function GetSourceToTargetTransparentTransfer should have comment or be unexported (golint)
    • Line 3673: warning: exported function BuildInitialContextSetupResponseForRegistraionTest should have comment or be unexported (golint)
    • Line 3715: warning: exported function BuildPDUSessionResourceSetupResponseForRegistrationTest should have comment or be unexported (golint)
    • Line 3798: warning: exported function BuildPDUSessionResourceReleaseResponseForReleaseTest should have comment or be unexported (golint)
    • Line 3862: warning: exported function BuildNGSetupResponse should have comment or be unexported (golint)
    • Line 3927: warning: exported function BuildPDUSessionResourceModifyConfirm should have comment or be unexported (golint)
    • Line 4002: warning: exported function BuildPDUSessionResourceReleaseCommand should have comment or be unexported (golint)
    • Line 4081: warning: exported function BuildOverloadStart should have comment or be unexported (golint)
    • Line 4141: warning: exported function BuildOverloadStop should have comment or be unexported (golint)
    • free5gc/test/mongodb.go
    • Line 26: warning: exported function InsertAuthSubscriptionToMongoDB should have comment or be unexported (golint)
    • Line 34: warning: exported function GetAuthSubscriptionFromMongoDB should have comment or be unexported (golint)
    • Line 53: warning: exported function DelAuthSubscriptionToMongoDB should have comment or be unexported (golint)
    • Line 59: warning: exported function InsertAccessAndMobilitySubscriptionDataToMongoDB should have comment or be unexported (golint)
    • Line 69: warning: exported function GetAccessAndMobilitySubscriptionDataFromMongoDB should have comment or be unexported (golint)
    • Line 89: warning: exported function DelAccessAndMobilitySubscriptionDataFromMongoDB should have comment or be unexported (golint)
    • Line 95: warning: exported function InsertSessionManagementSubscriptionDataToMongoDB should have comment or be unexported (golint)
    • Line 109: warning: exported function GetSessionManagementDataFromMongoDB should have comment or be unexported (golint)
    • Line 129: warning: exported function DelSessionManagementSubscriptionDataFromMongoDB should have comment or be unexported (golint)
    • Line 135: warning: exported function InsertSmfSelectionSubscriptionDataToMongoDB should have comment or be unexported (golint)
    • Line 145: warning: exported function GetSmfSelectionSubscriptionDataFromMongoDB should have comment or be unexported (golint)
    • Line 165: warning: exported function DelSmfSelectionSubscriptionDataFromMongoDB should have comment or be unexported (golint)
    • Line 171: warning: exported function InsertAmPolicyDataToMongoDB should have comment or be unexported (golint)
    • Line 179: warning: exported function GetAmPolicyDataFromMongoDB should have comment or be unexported (golint)
    • Line 198: warning: exported function DelAmPolicyDataFromMongoDB should have comment or be unexported (golint)
    • Line 204: warning: exported function InsertSmPolicyDataToMongoDB should have comment or be unexported (golint)
    • Line 212: warning: exported function GetSmPolicyDataFromMongoDB should have comment or be unexported (golint)
    • Line 231: warning: exported function DelSmPolicyDataFromMongoDB should have comment or be unexported (golint)
    • free5gc/test/ranUe.go
    • Line 20: warning: exported type RanUeContext should have comment or be unexported (golint)
    • Line 35: warning: exported function CalculateIpv4HeaderChecksum should have comment or be unexported (golint)
    • Line 52: warning: exported function GetAuthSubscription should have comment or be unexported (golint)
    • Line 72: warning: exported function GetAccessAndMobilitySubscriptionData should have comment or be unexported (golint)
    • Line 76: warning: exported function GetSmfSelectionSubscriptionData should have comment or be unexported (golint)
    • Line 80: warning: exported function GetSessionManagementSubscriptionData should have comment or be unexported (golint)
    • Line 84: warning: exported function GetAmPolicyData should have comment or be unexported (golint)
    • Line 88: warning: exported function GetSmPolicyData should have comment or be unexported (golint)
    • Line 92: warning: exported function NewRanUeContext should have comment or be unexported (golint)
    • Line 103: warning: exported method RanUeContext.DeriveRESstarAndSetKey should have comment or be unexported (golint)
    • Line 169: warning: don't use underscores in Go names; var kdfVal_for_resStar should be kdfValForResStar (golint)
    • Line 175: warning: exported method RanUeContext.DerivateKamf should have comment or be unexported (golint)
    • Line 202: warning: comment on exported method RanUeContext.DerivateAlgKey should be of the form "DerivateAlgKey ..." (golint)
    • Line 223: warning: exported method RanUeContext.GetUESecurityCapability should have comment or be unexported (golint)
    • Line 254: warning: exported method RanUeContext.Get5GMMCapability should have comment or be unexported (golint)
    • Line 262: warning: exported method RanUeContext.GetBearerType should have comment or be unexported (golint)
    • free5gc/test/ngsetup.go
    • Line 18: 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 29: 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 39: warning: exported function ConnectToAmf should have comment or be unexported (golint)
    • free5gc/test/non3gpp_test.go
    • Line 92: warning: don't use underscores in Go names; func parameter SPI_initiator should be SPIInitiator (golint)
    • Line 92: warning: don't use underscores in Go names; func parameter SPI_responder should be SPIResponder (golint)
    • Line 108: warning: don't use underscores in Go names; var length_SK_d should be lengthSKD (golint)
    • Line 108: warning: don't use underscores in Go names; var length_SK_ai should be lengthSKAi (golint)
    • Line 108: warning: don't use underscores in Go names; var length_SK_ar should be lengthSKAr (golint)
    • Line 108: warning: don't use underscores in Go names; var length_SK_ei should be lengthSKEi (golint)
    • Line 108: warning: don't use underscores in Go names; var length_SK_er should be lengthSKEr (golint)
    • Line 108: warning: don't use underscores in Go names; var length_SK_pi should be lengthSKPi (golint)
    • Line 108: warning: don't use underscores in Go names; var length_SK_pr should be lengthSKPr (golint)
    • Line 395: warning: don't use underscores in Go names; func parameter ue_is_initiator should be ueIsInitiator (golint)
    • free5gc/test/packet.go
    • Line 13: warning: exported function GetNGSetupRequest should have comment or be unexported (golint)
    • Line 27: warning: exported function GetInitialUEMessage should have comment or be unexported (golint)
    • Line 32: warning: exported function GetUplinkNASTransport should have comment or be unexported (golint)
    • Line 37: warning: exported function GetInitialContextSetupResponse should have comment or be unexported (golint)
    • Line 43: warning: exported function GetInitialContextSetupResponseForServiceRequest should have comment or be unexported (golint)
    • Line 49: warning: exported function GetPDUSessionResourceSetupResponse should have comment or be unexported (golint)
    • Line 53: warning: exported function EncodeNasPduWithSecurity should have comment or be unexported (golint)
    • Line 67: warning: exported function GetUEContextReleaseComplete should have comment or be unexported (golint)
    • Line 72: warning: exported function GetUEContextReleaseRequest should have comment or be unexported (golint)
    • Line 77: warning: exported function GetPDUSessionResourceReleaseResponse should have comment or be unexported (golint)
    • Line 81: warning: exported function GetPathSwitchRequest should have comment or be unexported (golint)
    • Line 88: warning: exported function GetHandoverRequired should have comment or be unexported (golint)
    • Line 94: warning: exported function GetHandoverRequestAcknowledge should have comment or be unexported (golint)
    • Line 99: warning: exported function GetHandoverNotify should have comment or be unexported (golint)
    • Line 104: warning: exported function GetPDUSessionResourceSetupResponseForPaging should have comment or be unexported (golint)
    • free5gc/test/security.go
    • Line 11: warning: exported function NASEncode should have comment or be unexported (golint)
    • Line 25: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 71: warning: exported function NASDecode should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell95%

Misspell Finds commonly misspelled English words