Preparing report...

Report for github.com/gunnarbeutner/gssapi

A+    Excellent!    Found 19 issues across 31 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!


gocyclo93%

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.

    • gssapi/oid.go
    • Line 123: warning: cyclomatic complexity 16 of function (*OID).DebugString() is high (> 15) (gocyclo)

golint58%

Golint is a linter for Go source code.

    • gssapi/test/service_message.go
    • Line 13: warning: comment on exported function HandleUnwrap should be of the form "HandleUnwrap ..." (golint)
    • Line 50: warning: exported function HandleVerifyMIC should have comment or be unexported (golint)
    • gssapi/consts.go
    • Line 61: warning: don't use underscores in Go names; const GSS_C_AF_DECnet should be GSSCAFDECnet (golint)
    • Line 86: warning: comment on exported const GSS_C_QOP_DEFAULT should be of the form "GSS_C_QOP_DEFAULT ..." (golint)
    • Line 89: warning: comment on exported const GSS_C_INDEFINITE should be of the form "GSS_C_INDEFINITE ..." (golint)
    • gssapi/context.go
    • Line 155: warning: exported method Lib.NewCtxId should have comment or be unexported (golint)
    • Line 175: warning: don't use underscores in Go names; var C_initiator should be CInitiator (golint)
    • Line 180: warning: don't use underscores in Go names; var C_mechType should be CMechType (golint)
    • Line 185: warning: don't use underscores in Go names; var C_inputToken should be CInputToken (golint)
    • Line 251: warning: don't use underscores in Go names; var C_acceptorCredHandle should be CAcceptorCredHandle (golint)
    • Line 256: warning: don't use underscores in Go names; var C_inputToken should be CInputToken (golint)
    • gssapi/gss_types.go
    • Line 26: warning: don't use underscores in Go names; struct field C_gss_buffer_t should be CGssBufferT (golint)
    • Line 37: warning: don't use underscores in Go names; struct field C_gss_name_t should be CGssNameT (golint)
    • Line 47: warning: don't use underscores in Go names; struct field C_gss_OID should be CGssOID (golint)
    • Line 57: warning: don't use underscores in Go names; struct field C_gss_OID_set should be CGssOIDSet (golint)
    • Line 64: warning: don't use underscores in Go names; struct field C_gss_cred_id_t should be CGssCredIDT (golint)
    • Line 71: warning: don't use underscores in Go names; struct field C_gss_ctx_id_t should be CGssCtxIDT (golint)
    • Line 74: warning: comment on exported type CredUsage should be of the form "CredUsage ..." (with optional leading article) (golint)
    • Line 76: warning: exported type ChannelBindingAddressFamily should have comment or be unexported (golint)
    • Line 77: warning: exported type QOP should have comment or be unexported (golint)
    • Line 79: warning: comment on exported type ChannelBindings should be of the form "ChannelBindings ..." (with optional leading article) (golint)
    • gssapi/lib.go
    • Line 64: warning: exported type Severity should have comment or be unexported (golint)
    • Line 120: warning: don't use underscores in Go names; struct field Fp_gss_release_buffer should be FpGssReleaseBuffer (golint)
    • Line 121: warning: don't use underscores in Go names; struct field Fp_gss_import_name should be FpGssImportName (golint)
    • Line 124: warning: don't use underscores in Go names; struct field Fp_gss_init_sec_context should be FpGssInitSecContext (golint)
    • Line 125: warning: don't use underscores in Go names; struct field Fp_gss_accept_sec_context should be FpGssAcceptSecContext (golint)
    • Line 126: warning: don't use underscores in Go names; struct field Fp_gss_delete_sec_context should be FpGssDeleteSecContext (golint)
    • Line 127: warning: don't use underscores in Go names; struct field Fp_gss_process_context_token should be FpGssProcessContextToken (golint)
    • Line 128: warning: don't use underscores in Go names; struct field Fp_gss_context_time should be FpGssContextTime (golint)
    • Line 129: warning: don't use underscores in Go names; struct field Fp_gss_inquire_context should be FpGssInquireContext (golint)
    • Line 130: warning: don't use underscores in Go names; struct field Fp_gss_wrap_size_limit should be FpGssWrapSizeLimit (golint)
    • Line 131: warning: don't use underscores in Go names; struct field Fp_gss_export_sec_context should be FpGssExportSecContext (golint)
    • Line 132: warning: don't use underscores in Go names; struct field Fp_gss_import_sec_context should be FpGssImportSecContext (golint)
    • Line 135: warning: don't use underscores in Go names; struct field Fp_gss_acquire_cred should be FpGssAcquireCred (golint)
    • Line 136: warning: don't use underscores in Go names; struct field Fp_gss_add_cred should be FpGssAddCred (golint)
    • Line 137: warning: don't use underscores in Go names; struct field Fp_gss_inquire_cred should be FpGssInquireCred (golint)
    • Line 138: warning: don't use underscores in Go names; struct field Fp_gss_inquire_cred_by_mech should be FpGssInquireCredByMech (golint)
    • Line 139: warning: don't use underscores in Go names; struct field Fp_gss_release_cred should be FpGssReleaseCred (golint)
    • Line 142: warning: don't use underscores in Go names; struct field Fp_gss_get_mic should be FpGssGetMic (golint)
    • Line 143: warning: don't use underscores in Go names; struct field Fp_gss_verify_mic should be FpGssVerifyMic (golint)
    • Line 144: warning: don't use underscores in Go names; struct field Fp_gss_wrap should be FpGssWrap (golint)
    • Line 145: warning: don't use underscores in Go names; struct field Fp_gss_unwrap should be FpGssUnwrap (golint)
    • Line 148: warning: don't use underscores in Go names; struct field Fp_gss_indicate_mechs should be FpGssIndicateMechs (golint)
    • Line 151: warning: don't use underscores in Go names; struct field Fp_gss_canonicalize_name should be FpGssCanonicalizeName (golint)
    • Line 152: warning: don't use underscores in Go names; struct field Fp_gss_compare_name should be FpGssCompareName (golint)
    • Line 153: warning: don't use underscores in Go names; struct field Fp_gss_display_name should be FpGssDisplayName (golint)
    • Line 154: warning: don't use underscores in Go names; struct field Fp_gss_duplicate_name should be FpGssDuplicateName (golint)
    • Line 155: warning: don't use underscores in Go names; struct field Fp_gss_export_name should be FpGssExportName (golint)
    • Line 156: warning: don't use underscores in Go names; struct field Fp_gss_inquire_mechs_for_name should be FpGssInquireMechsForName (golint)
    • Line 157: warning: don't use underscores in Go names; struct field Fp_gss_inquire_names_for_mech should be FpGssInquireNamesForMech (golint)
    • Line 158: warning: don't use underscores in Go names; struct field Fp_gss_release_name should be FpGssReleaseName (golint)
    • Line 161: warning: don't use underscores in Go names; struct field Fp_gss_create_empty_oid_set should be FpGssCreateEmptyOidSet (golint)
    • Line 162: warning: don't use underscores in Go names; struct field Fp_gss_add_oid_set_member should be FpGssAddOidSetMember (golint)
    • Line 163: warning: don't use underscores in Go names; struct field Fp_gss_release_oid_set should be FpGssReleaseOidSet (golint)
    • Line 164: warning: don't use underscores in Go names; struct field Fp_gss_test_oid_set_member should be FpGssTestOidSetMember (golint)
    • Line 167: warning: don't use underscores in Go names; struct field Fp_gss_display_status should be FpGssDisplayStatus (golint)
    • Line 266: warning: don't use underscores in Go names; var lib_cs should be libCs (golint)
    • Line 387: warning: exported method Lib.Emerg should have comment or be unexported (golint)
    • Line 388: warning: exported method Lib.Alert should have comment or be unexported (golint)
    • Line 389: warning: exported method Lib.Crit should have comment or be unexported (golint)
    • Line 390: warning: exported method Lib.Err should have comment or be unexported (golint)
    • Line 391: warning: exported method Lib.Warn should have comment or be unexported (golint)
    • Line 392: warning: exported method Lib.Notice should have comment or be unexported (golint)
    • Line 393: warning: exported method Lib.Info should have comment or be unexported (golint)
    • Line 394: warning: exported method Lib.Debug should have comment or be unexported (golint)
    • gssapi/name.go
    • Line 207: warning: don't use underscores in Go names; method parameter mech_type should be mechType (golint)
    • Line 279: warning: comment on exported method Lib.InquireNamesForMechs should be of the form "InquireNamesForMechs ..." (golint)
    • Line 281: warning: don't use underscores in Go names; method result name_types should be nameTypes (golint)
    • gssapi/status.go
    • Line 96: warning: don't use underscores in Go names; const field_GSS_S_CONTINUE_NEEDED should be fieldGSSSCONTINUENEEDED (golint)
    • Line 97: warning: don't use underscores in Go names; const field_GSS_S_DUPLICATE_TOKEN should be fieldGSSSDUPLICATETOKEN (golint)
    • Line 98: warning: don't use underscores in Go names; const field_GSS_S_OLD_TOKEN should be fieldGSSSOLDTOKEN (golint)
    • Line 99: warning: don't use underscores in Go names; const field_GSS_S_UNSEQ_TOKEN should be fieldGSSSUNSEQTOKEN (golint)
    • Line 100: warning: don't use underscores in Go names; const field_GSS_S_GAP_TOKEN should be fieldGSSSGAPTOKEN (golint)
    • Line 103: warning: comment on exported type MajorStatus should be of the form "MajorStatus ..." (with optional leading article) (golint)
    • Line 205: warning: don't use underscores in Go names; var code_type should be codeType (golint)
    • gssapi/doc.go
    • Line 3: warning: package comment should be of the form "Package gssapi ..." (golint)
    • gssapi/oid.go
    • Line 121: warning: comment on exported method OID.DebugString should be of the form "DebugString ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign70%

IneffAssign detects ineffectual assignments in Go code.

    • gssapi/spnego/spnego_server.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/gunnarbeutner/gssapi (invalid package name: "") (ineffassign)
    • Line 36: warning: k.MakeBufferString undefined (type KerberizedServer has no field or method MakeBufferString) (ineffassign)
    • Line 42: warning: k.GSS_KRB5_NT_PRINCIPAL_NAME undefined (type KerberizedServer has no field or method GSS_KRB5_NT_PRINCIPAL_NAME) (ineffassign)
    • Line 49: warning: k.GSS_C_NO_OID_SET undefined (type KerberizedServer has no field or method GSS_C_NO_OID_SET) (ineffassign)
    • Line 88: warning: k.AcceptSecContext undefined (type KerberizedServer has no field or method AcceptSecContext) (ineffassign)
    • Line 88: warning: k.GSS_C_NO_CONTEXT undefined (type KerberizedServer has no field or method GSS_C_NO_CONTEXT) (ineffassign)
    • Line 89: warning: k.GSS_C_NO_CHANNEL_BINDINGS undefined (type KerberizedServer has no field or method GSS_C_NO_CHANNEL_BINDINGS) (ineffassign)
    • Line 11: warning: could not import github.com/gunnarbeutner/gssapi (invalid package name: "") (ineffassign)
    • Line 36: warning: k.MakeBufferString undefined (type KerberizedServer has no field or method MakeBufferString) (ineffassign)
    • Line 42: warning: k.GSS_KRB5_NT_PRINCIPAL_NAME undefined (type KerberizedServer has no field or method GSS_KRB5_NT_PRINCIPAL_NAME) (ineffassign)
    • Line 49: warning: k.GSS_C_NO_OID_SET undefined (type KerberizedServer has no field or method GSS_C_NO_OID_SET) (ineffassign)
    • Line 88: warning: k.AcceptSecContext undefined (type KerberizedServer has no field or method AcceptSecContext) (ineffassign)
    • Line 88: warning: k.GSS_C_NO_CONTEXT undefined (type KerberizedServer has no field or method GSS_C_NO_CONTEXT) (ineffassign)
    • Line 89: warning: k.GSS_C_NO_CHANNEL_BINDINGS undefined (type KerberizedServer has no field or method GSS_C_NO_CHANNEL_BINDINGS) (ineffassign)
    • gssapi/buffer.go
    • Line 54: warning: could not import C (no metadata for C) (ineffassign)
    • Line 54: warning: could not import C (no metadata for C) (ineffassign)
    • gssapi/credential.go
    • Line 240: warning: cannot convert 0 (untyped int constant) to CredUsage (ineffassign)
    • Line 252: warning: cannot use 0 (untyped int constant) as CredUsage value in return statement (ineffassign)
    • Line 273: warning: cannot convert 0 (untyped int constant) to CredUsage (ineffassign)
    • Line 285: warning: cannot use 0 (untyped int constant) as CredUsage value in return statement (ineffassign)
    • Line 240: warning: cannot convert 0 (untyped int constant) to CredUsage (ineffassign)
    • Line 252: warning: cannot use 0 (untyped int constant) as CredUsage value in return statement (ineffassign)
    • Line 273: warning: cannot convert 0 (untyped int constant) to CredUsage (ineffassign)
    • Line 285: warning: cannot use 0 (untyped int constant) as CredUsage value in return statement (ineffassign)
    • gssapi/test/service.go
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: could not import github.com/gunnarbeutner/gssapi (invalid package name: "") (ineffassign)
    • Line 14: warning: undeclared name: Context (ineffassign)
    • Line 15: warning: undeclared name: Context (ineffassign)
    • Line 30: warning: undeclared name: Context (ineffassign)
    • Line 26: warning: h.Print undefined (type loggingHandler has no field or method Print) (ineffassign)
    • Line 10: warning: could not import github.com/gunnarbeutner/gssapi (invalid package name: "") (ineffassign)
    • Line 26: warning: h.Print undefined (type loggingHandler has no field or method Print) (ineffassign)
    • Line 34: warning: c.Debug undefined (type *Context has no field or method Debug) (ineffassign)
    • Line 36: warning: c.MakeBufferString undefined (type *Context has no field or method MakeBufferString) (ineffassign)
    • Line 42: warning: c.GSS_KRB5_NT_PRINCIPAL_NAME undefined (type *Context has no field or method GSS_KRB5_NT_PRINCIPAL_NAME) (ineffassign)
    • Line 48: warning: c.AcquireCred undefined (type *Context has no field or method AcquireCred) (ineffassign)
    • Line 49: warning: c.GSS_C_NO_OID_SET undefined (type *Context has no field or method GSS_C_NO_OID_SET) (ineffassign)
    • Line 60: warning: c.Debug undefined (type *Context has no field or method Debug) (ineffassign)
    • gssapi/test/service_access.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/gunnarbeutner/gssapi/spnego (invalid package name: "") (ineffassign)
    • Line 12: warning: undeclared name: Context (ineffassign)
    • Line 26: warning: undeclared name: Context (ineffassign)
    • Line 9: warning: could not import github.com/gunnarbeutner/gssapi/spnego (invalid package name: "") (ineffassign)
    • Line 38: warning: c.AcceptSecContext undefined (type *Context has no field or method AcceptSecContext) (ineffassign)
    • Line 38: warning: c.GSS_C_NO_CONTEXT undefined (type *Context has no field or method GSS_C_NO_CONTEXT) (ineffassign)
    • Line 39: warning: c.GSS_C_NO_CHANNEL_BINDINGS undefined (type *Context has no field or method GSS_C_NO_CHANNEL_BINDINGS) (ineffassign)
    • gssapi/test/main_test.go
    • Line 61: warning: c.Debug undefined (type *Context has no field or method Debug) (ineffassign)
    • Line 99: warning: c.MakeBufferString undefined (type *Context has no field or method MakeBufferString) (ineffassign)
    • Line 105: warning: c.GSS_KRB5_NT_PRINCIPAL_NAME undefined (type *Context has no field or method GSS_KRB5_NT_PRINCIPAL_NAME) (ineffassign)
    • gssapi/message.go
    • Line 151: warning: cannot use 0 (untyped int constant) as QOP value in return statement (ineffassign)
    • Line 206: warning: cannot use 0 (untyped int constant) as QOP value in return statement (ineffassign)
    • Line 222: warning: cannot use 0 (untyped int constant) as QOP value in return statement (ineffassign)
    • Line 151: warning: cannot use 0 (untyped int constant) as QOP value in return statement (ineffassign)
    • Line 206: warning: cannot use 0 (untyped int constant) as QOP value in return statement (ineffassign)
    • Line 222: warning: cannot use 0 (untyped int constant) as QOP value in return statement (ineffassign)
    • gssapi/test/service_message.go
    • Line 14: warning: undeclared name: Context (ineffassign)
    • Line 50: warning: undeclared name: Context (ineffassign)
    • Line 56: warning: undeclared name: micHeader (ineffassign)
    • Line 58: warning: undeclared name: micHeader (ineffassign)
    • Line 26: warning: c.MakeBufferBytes undefined (type *Context has no field or method MakeBufferBytes) (ineffassign)
    • Line 64: warning: c.MakeBufferBytes undefined (type *Context has no field or method MakeBufferBytes) (ineffassign)
    • Line 73: warning: c.MakeBufferBytes undefined (type *Context has no field or method MakeBufferBytes) (ineffassign)

misspell96%

Misspell Finds commonly misspelled English words