Preparing report...

Report for github.com/gostor/gotgt

A    Great!    Found 51 issues across 73 files

Tweet

gofmt89%

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.

    • gotgt/pkg/scsi/spc.go
    • Line 555: warning: cyclomatic complexity 22 of function SPCModeSense() is high (> 15) (gocyclo)
    • Line 1209: warning: cyclomatic complexity 22 of function SPCPRPreempt() is high (> 15) (gocyclo)
    • Line 276: warning: cyclomatic complexity 16 of function SPCInquiry() is high (> 15) (gocyclo)
    • gotgt/pkg/homedir/user.go
    • Line 240: warning: cyclomatic complexity 29 of function GetExecUser() is high (> 15) (gocyclo)
    • Line 380: warning: cyclomatic complexity 16 of function GetAdditionalGroups() is high (> 15) (gocyclo)
    • gotgt/pkg/port/iscsit/iscsid.go
    • Line 574: warning: cyclomatic complexity 33 of function (*ISCSITargetDriver).txHandler() is high (> 15) (gocyclo)
    • Line 700: warning: cyclomatic complexity 31 of function (*ISCSITargetDriver).scsiCommandHandler() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 28 of function (*ISCSITargetDriver).rxHandler() is high (> 15) (gocyclo)
    • gotgt/pkg/port/iscsit/conn.go
    • Line 151: warning: cyclomatic complexity 19 of function (*iscsiConnection).buildRespPackage() is high (> 15) (gocyclo)
    • Line 238: warning: cyclomatic complexity 17 of function (*iscsiConnection).State() is high (> 15) (gocyclo)

golint39%

Golint is a linter for Go source code.

    • gotgt/pkg/scsi/scsi.go
    • Line 31: warning: exported type SCSITargetService should have comment or be unexported (golint)
    • Line 39: warning: exported function NewSCSITargetService should have comment or be unexported (golint)
    • Line 46: warning: exported method SCSITargetService.GetTargetList should have comment or be unexported (golint)
    • Line 56: warning: exported method SCSITargetService.Resize should have comment or be unexported (golint)
    • Line 70: warning: exported method SCSITargetService.AddCommandQueue should have comment or be unexported (golint)
    • Line 118: warning: exported type SCSIServiceAction should have comment or be unexported (golint)
    • Line 123: warning: exported type SCSIDeviceOperation should have comment or be unexported (golint)
    • Line 129: warning: exported type BaseSCSIDeviceProtocol should have comment or be unexported (golint)
    • Line 134: warning: exported function NewSCSIDeviceOperation should have comment or be unexported (golint)
    • Line 142: warning: exported function BuildSenseData should have comment or be unexported (golint)
    • gotgt/pkg/homedir/lookup_unix.go
    • Line 16: warning: exported function GetPasswdPath should have comment or be unexported (golint)
    • Line 20: warning: exported function GetPasswd should have comment or be unexported (golint)
    • Line 24: warning: exported function GetGroupPath should have comment or be unexported (golint)
    • Line 28: warning: exported function GetGroup should have comment or be unexported (golint)
    • gotgt/pkg/homedir/user.go
    • Line 18: warning: exported var ErrRange should have comment or be unexported (golint)
    • Line 21: warning: exported type User should have comment or be unexported (golint)
    • Line 31: warning: exported type Group should have comment or be unexported (golint)
    • Line 73: warning: exported function ParsePasswdFile should have comment or be unexported (golint)
    • Line 82: warning: exported function ParsePasswd should have comment or be unexported (golint)
    • Line 86: warning: exported function ParsePasswdFileFilter should have comment or be unexported (golint)
    • Line 95: warning: exported function ParsePasswdFilter should have comment or be unexported (golint)
    • Line 131: warning: exported function ParseGroupFile should have comment or be unexported (golint)
    • Line 141: warning: exported function ParseGroup should have comment or be unexported (golint)
    • Line 145: warning: exported function ParseGroupFileFilter should have comment or be unexported (golint)
    • Line 154: warning: exported function ParseGroupFilter should have comment or be unexported (golint)
    • Line 190: warning: exported type ExecUser should have comment or be unexported (golint)
    • gotgt/pkg/util/util.go
    • Line 26: warning: exported type KeyValue should have comment or be unexported (golint)
    • Line 31: warning: exported function GetUnalignedUint16 should have comment or be unexported (golint)
    • Line 35: warning: exported function GetUnalignedUint32 should have comment or be unexported (golint)
    • Line 39: warning: exported function GetUnalignedUint64 should have comment or be unexported (golint)
    • Line 65: warning: exported function MarshalKVText should have comment or be unexported (golint)
    • Line 76: warning: exported function MarshalUint16 should have comment or be unexported (golint)
    • Line 85: warning: exported function MarshalUint32 should have comment or be unexported (golint)
    • Line 94: warning: exported function MarshalUint64 should have comment or be unexported (golint)
    • Line 104: warning: exported function StringToByte should have comment or be unexported (golint)
    • Line 119: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 127: warning: exported const POSIX_FADV_NORMAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 135: warning: exported function Fadvise should have comment or be unexported (golint)
    • gotgt/pkg/scsi/lun.go
    • Line 26: warning: comment on exported function NewSCSILu should be of the form "NewSCSILu ..." (golint)
    • Line 62: warning: comment on exported function NewLUN0 should be of the form "NewLUN0 ..." (golint)
    • Line 82: warning: exported function GetReservation should have comment or be unexported (golint)
    • gotgt/pkg/scsi/scsilumap.go
    • Line 29: warning: exported type BackendType should have comment or be unexported (golint)
    • Line 31: warning: exported type SCSILUMap should have comment or be unexported (golint)
    • Line 47: warning: exported type LUNMapping should have comment or be unexported (golint)
    • Line 63: warning: exported function GetLU should have comment or be unexported (golint)
    • Line 73: warning: exported function GetTargetLUNMap should have comment or be unexported (golint)
    • Line 81: warning: exported function GetTargetBSMap should have comment or be unexported (golint)
    • Line 93: warning: exported function AddBackendStorage should have comment or be unexported (golint)
    • Line 109: warning: exported function DelBackendStorage should have comment or be unexported (golint)
    • Line 115: warning: exported function AddLUNMapping should have comment or be unexported (golint)
    • Line 127: warning: exported function DelLUNMapping should have comment or be unexported (golint)
    • Line 133: warning: exported function InitSCSILUMap should have comment or be unexported (golint)
    • Line 153: warning: exported function InitSCSILUMapEx should have comment or be unexported (golint)
    • gotgt/pkg/scsi/spc.go
    • Line 17: warning: package comment should be of the form "Package scsi ..." (golint)
    • Line 32: warning: exported var EnableMultipath should have comment or be unexported (golint)
    • Line 35: warning: exported function SPCIllegalOp should have comment or be unexported (golint)
    • Line 40: warning: exported function SPCLuOffline should have comment or be unexported (golint)
    • Line 45: warning: exported function SPCLuOnline should have comment or be unexported (golint)
    • Line 54: warning: exported function InquiryPage0x00 should have comment or be unexported (golint)
    • Line 90: warning: exported function InquiryPage0x80 should have comment or be unexported (golint)
    • Line 113: warning: exported function InquiryPage0x83 should have comment or be unexported (golint)
    • Line 195: warning: exported function InquiryPage0xB0 should have comment or be unexported (golint)
    • Line 231: warning: exported function InquiryPage0xB2 should have comment or be unexported (golint)
    • Line 269: warning: comment on exported function SPCInquiry should be of the form "SPCInquiry ..." (golint)
    • Line 404: warning: comment on exported function SPCReportLuns should be of the form "SPCReportLuns ..." (golint)
    • Line 472: warning: exported function SPCStartStop should have comment or be unexported (golint)
    • Line 512: warning: comment on exported function SPCTestUnit should be of the form "SPCTestUnit ..." (golint)
    • Line 537: warning: exported function SPCPreventAllowMediaRemoval should have comment or be unexported (golint)
    • Line 546: warning: comment on exported function SPCModeSense should be of the form "SPCModeSense ..." (golint)
    • Line 661: warning: comment on exported function SPCSendDiagnostics should be of the form "SPCSendDiagnostics ..." (golint)
    • Line 685: warning: don't use underscores in Go names; var scsi_command_size should be scsiCommandSize (golint)
    • Line 731: warning: exported function SPCReportSupportedOperationCodes should have comment or be unexported (golint)
    • Line 733: warning: don't use underscores in Go names; var reporting_options should be reportingOptions (golint)
    • Line 772: warning: comment on exported function SPCServiceAction should be of the form "SPCServiceAction ..." (golint)
    • Line 790: warning: exported function SPCPRReadKeys should have comment or be unexported (golint)
    • Line 825: warning: exported function SPCPRReadReservation should have comment or be unexported (golint)
    • Line 857: warning: don't use underscores in Go names; var scope_type should be scopeType (golint)
    • Line 883: warning: exported function SPCPRReportCapabilities should have comment or be unexported (golint)
    • Line 933: warning: don't use underscores in Go names; var spec_i_pt should be specIPt (golint)
    • Line 934: warning: don't use underscores in Go names; var all_tg_pt should be allTgPt (golint)
    • Line 943: warning: exported function SPCPRRegister should have comment or be unexported (golint)
    • Line 1004: warning: exported function SPCPRReserve should have comment or be unexported (golint)
    • Line 1068: warning: exported function SPCPRRelease should have comment or be unexported (golint)
    • Line 1153: warning: exported function SPCPRClear should have comment or be unexported (golint)
    • Line 1209: warning: exported function SPCPRPreempt should have comment or be unexported (golint)
    • Line 1311: warning: exported function SPCPRRegisterAndMove should have comment or be unexported (golint)
    • Line 1358: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1399: warning: comment on exported function SPCRequestSense should be of the form "SPCRequestSense ..." (golint)
    • gotgt/pkg/scsi/backingstore/common.go
    • Line 30: warning: exported const FileBackingStorage should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type FileBackingStore should have comment or be unexported (golint)
    • Line 52: warning: exported method FileBackingStore.Open should have comment or be unexported (golint)
    • Line 56: 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 66: warning: exported method FileBackingStore.Close should have comment or be unexported (golint)
    • Line 70: warning: exported method FileBackingStore.Init should have comment or be unexported (golint)
    • Line 74: warning: exported method FileBackingStore.Exit should have comment or be unexported (golint)
    • Line 78: warning: exported method FileBackingStore.Size should have comment or be unexported (golint)
    • Line 109: warning: exported method FileBackingStore.DataSync should have comment or be unexported (golint)
    • Line 113: warning: exported method FileBackingStore.DataAdvise should have comment or be unexported (golint)
    • Line 117: warning: exported method FileBackingStore.Unmap should have comment or be unexported (golint)
    • gotgt/cmd/daemon.go
    • Line 29: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 31: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • gotgt/pkg/scsi/target.go
    • Line 28: warning: exported method SCSITargetService.NewSCSITarget should have comment or be unexported (golint)
    • Line 48: warning: exported method SCSITargetService.RereadTargetLUNMap should have comment or be unexported (golint)
    • Line 57: warning: exported function FindTargetGroup should have comment or be unexported (golint)
    • Line 68: warning: exported function FindTargetPort should have comment or be unexported (golint)
    • Line 79: warning: exported function AddITNexus should have comment or be unexported (golint)
    • Line 92: warning: exported function RemoveITNexus should have comment or be unexported (golint)
    • gotgt/pkg/port/iscsit/auth.go
    • Line 19: warning: exported type AuthMethod should have comment or be unexported (golint)
    • Line 22: warning: exported const AuthNone should have comment (or a comment on this block) or be unexported (golint)
    • gotgt/pkg/api/types.go
    • Line 1: warning: package comment should be of the form "Package api ..." (golint)
    • Line 26: warning: exported type SCSICommandType should have comment or be unexported (golint)
    • Line 29: warning: exported var TEST_UNIT_READY should have comment or be unexported (golint)
    • Line 131: warning: exported type SCSITargetState should have comment or be unexported (golint)
    • Line 134: warning: exported var TargetOnline should have comment or be unexported (golint)
    • Line 138: warning: exported type SCSIDataDirection should have comment or be unexported (golint)
    • Line 141: warning: exported const SCSIDataNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 147: warning: exported type SenseBuffer should have comment or be unexported (golint)
    • Line 152: warning: exported type SCSIDataBuffer should have comment or be unexported (golint)
    • Line 159: warning: exported type SCSICommandState should have comment or be unexported (golint)
    • Line 162: warning: exported var SCSICommandQueued should have comment or be unexported (golint)
    • Line 168: warning: exported type SCSICommand should have comment or be unexported (golint)
    • Line 193: warning: exported type ITNexus should have comment or be unexported (golint)
    • Line 200: warning: exported type ITNexusLuInfo should have comment or be unexported (golint)
    • Line 206: warning: exported type SCSITargetPort should have comment or be unexported (golint)
    • Line 211: warning: exported type TargetPortGroup should have comment or be unexported (golint)
    • Line 216: warning: exported type SCSITarget should have comment or be unexported (golint)
    • Line 231: warning: exported type SCSITargetDriverState should have comment or be unexported (golint)
    • Line 234: warning: comment on exported const SCSI_DRIVER_REGD should be of the form "SCSI_DRIVER_REGD ..." (golint)
    • Line 236: warning: comment on exported const SCSI_DRIVER_INIT should be of the form "SCSI_DRIVER_INIT ..." (golint)
    • Line 238: warning: comment on exported const SCSI_DRIVER_ERR should be of the form "SCSI_DRIVER_ERR ..." (golint)
    • Line 240: warning: comment on exported const SCSI_DRIVER_EXIT should be of the form "SCSI_DRIVER_EXIT ..." (golint)
    • Line 244: warning: exported type SCSITargetDriverCommon should have comment or be unexported (golint)
    • Line 250: warning: exported type SCSILuPhyAttribute should have comment or be unexported (golint)
    • Line 283: warning: exported var DefaultBlockShift should have comment or be unexported (golint)
    • Line 288: warning: exported var SAM_STAT_GOOD should have comment or be unexported (golint)
    • Line 301: warning: exported type SAMStat should have comment or be unexported (golint)
    • Line 307: warning: exported var SAMStatGood should have comment or be unexported (golint)
    • Line 320: warning: exported type SCSIDeviceType should have comment or be unexported (golint)
    • Line 323: warning: exported var TYPE_DISK should have comment or be unexported (golint)
    • Line 344: warning: exported type CommandFunc should have comment or be unexported (golint)
    • Line 346: warning: exported type BackingStore should have comment or be unexported (golint)
    • Line 359: warning: exported type SCSIDeviceProtocol should have comment or be unexported (golint)
    • Line 368: warning: exported type ModePage should have comment or be unexported (golint)
    • Line 378: warning: exported type SCSIReservation should have comment or be unexported (golint)
    • Line 387: warning: exported type SCSILu should have comment or be unexported (golint)
    • Line 408: warning: exported type LUNMap should have comment or be unexported (golint)
    • Line 410: warning: exported type UnmapBlockDescriptor should have comment or be unexported (golint)
    • Line 415: warning: exported type ReaderWriterAt should have comment or be unexported (golint)
    • Line 420: warning: exported type RemoteBackingStore should have comment or be unexported (golint)
    • gotgt/pkg/scsi/backingstore/null.go
    • Line 28: warning: exported type NullBackingStore should have comment or be unexported (golint)
    • Line 42: warning: exported method NullBackingStore.Open should have comment or be unexported (golint)
    • Line 46: warning: exported method NullBackingStore.Close should have comment or be unexported (golint)
    • Line 50: warning: exported method NullBackingStore.Init should have comment or be unexported (golint)
    • Line 54: warning: exported method NullBackingStore.Exit should have comment or be unexported (golint)
    • Line 58: warning: exported method NullBackingStore.Size should have comment or be unexported (golint)
    • Line 70: warning: exported method NullBackingStore.DataSync should have comment or be unexported (golint)
    • Line 74: warning: exported method NullBackingStore.DataAdvise should have comment or be unexported (golint)
    • Line 78: warning: exported method NullBackingStore.Unmap should have comment or be unexported (golint)
    • gotgt/pkg/scsi/drivers.go
    • Line 17: warning: package comment should be of the form "Package scsi ..." (golint)
    • Line 26: warning: exported type SCSITargetDriver should have comment or be unexported (golint)
    • Line 37: warning: exported type Stats should have comment or be unexported (golint)
    • Line 56: warning: exported type TargetDriverFunc should have comment or be unexported (golint)
    • Line 60: warning: exported function RegisterTargetDriver should have comment or be unexported (golint)
    • Line 64: warning: exported function NewTargetDriver should have comment or be unexported (golint)
    • gotgt/pkg/port/iscsit/cmd.go
    • Line 30: warning: exported type OpCode should have comment or be unexported (golint)
    • Line 33: warning: comment on exported const OpNoopOut should be of the form "OpNoopOut ..." (golint)
    • Line 35: warning: exported const OpSCSICmd should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: comment on exported const OpNoopIn should be of the form "OpNoopIn ..." (golint)
    • Line 56: warning: exported const MaxBurstLength should have comment (or a comment on this block) or be unexported (golint)
    • Line 81: warning: exported const DataPadding should have comment or be unexported (golint)
    • Line 83: warning: exported type ISCSITaskManagementFunc should have comment or be unexported (golint)
    • Line 89: warning: exported type ISCSICommand should have comment or be unexported (golint)
    • Line 149: warning: exported method ISCSICommand.Bytes should have comment or be unexported (golint)
    • Line 171: warning: receiver name m should be consistent with previous receiver name cmd for ISCSICommand (golint)
    • Line 210: warning: comment on exported function ParseUint should be of the form "ParseUint ..." (golint)
    • Line 292: warning: receiver name m should be consistent with previous receiver name cmd for ISCSICommand (golint)
    • Line 335: warning: receiver name m should be consistent with previous receiver name cmd for ISCSICommand (golint)
    • Line 381: warning: receiver name m should be consistent with previous receiver name cmd for ISCSICommand (golint)
    • Line 421: warning: receiver name m should be consistent with previous receiver name cmd for ISCSICommand (golint)
    • Line 456: warning: receiver name m should be consistent with previous receiver name cmd for ISCSICommand (golint)
    • Line 482: warning: receiver name m should be consistent with previous receiver name cmd for ISCSICommand (golint)
    • gotgt/pkg/port/iscsit/iscsid.go
    • Line 36: warning: exported const ISCSI_MAX_TSIH should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported const STATE_INIT should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported var EnableStats should have comment or be unexported (golint)
    • Line 53: warning: exported type ISCSITargetDriver should have comment or be unexported (golint)
    • Line 74: warning: exported function NewISCSITargetDriver should have comment or be unexported (golint)
    • Line 90: warning: exported method ISCSITargetDriver.AllocTSIH should have comment or be unexported (golint)
    • Line 105: warning: exported method ISCSITargetDriver.ReleaseTSIH should have comment or be unexported (golint)
    • Line 111: warning: exported method ISCSITargetDriver.NewTarget should have comment or be unexported (golint)
    • Line 136: warning: exported method ISCSITargetDriver.SetClusterIP should have comment or be unexported (golint)
    • Line 140: warning: exported method ISCSITargetDriver.EnableBlockMultipleHostLogin should have comment or be unexported (golint)
    • Line 144: warning: exported method ISCSITargetDriver.RereadTargetLUNMap should have comment or be unexported (golint)
    • Line 148: warning: exported method ISCSITargetDriver.AddiSCSIPortal should have comment or be unexported (golint)
    • Line 173: warning: exported method ISCSITargetDriver.HasPortal should have comment or be unexported (golint)
    • Line 190: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 195: warning: exported method ISCSITargetDriver.Run should have comment or be unexported (golint)
    • Line 258: warning: exported method ISCSITargetDriver.Close should have comment or be unexported (golint)
    • Line 280: warning: exported method ISCSITargetDriver.Resize should have comment or be unexported (golint)
    • Line 637: 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 789: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 841: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 975: warning: exported method ISCSITargetDriver.Stats should have comment or be unexported (golint)
    • Line 986: warning: exported method ISCSITargetDriver.UpdateStats should have comment or be unexported (golint)
    • gotgt/pkg/port/iscsit/iscsit.go
    • Line 17: warning: package comment should be of the form "Package iscsit ..." (golint)
    • Line 31: warning: exported const IOSTATE_FREE should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported var ISCSI_OPCODE_MASK should have comment or be unexported (golint)
    • Line 60: warning: exported type ISCSIDiscoveryMethod should have comment or be unexported (golint)
    • Line 63: warning: exported var ISCSIDiscoverySendTargets should have comment or be unexported (golint)
    • Line 68: warning: exported type ISCSIRedirectInfo should have comment or be unexported (golint)
    • Line 81: warning: exported type ISCSITarget should have comment or be unexported (golint)
    • Line 97: warning: comment on exported function MakeSSID should be of the form "MakeSSID ..." (golint)
    • Line 107: warning: exported function ParseSSID should have comment or be unexported (golint)
    • Line 113: warning: exported method ISCSITarget.FindTPG should have comment or be unexported (golint)
    • Line 132: warning: exported method ISCSITarget.Init should have comment or be unexported (golint)
    • Line 136: warning: exported method ISCSITarget.Exit should have comment or be unexported (golint)
    • Line 140: warning: exported method ISCSITarget.CreateTarget should have comment or be unexported (golint)
    • Line 144: warning: exported method ISCSITarget.DestroyTarget should have comment or be unexported (golint)
    • Line 148: warning: exported method ISCSITarget.CreatePortal should have comment or be unexported (golint)
    • Line 152: warning: exported method ISCSITarget.DestroyPortal should have comment or be unexported (golint)
    • Line 156: warning: exported method ISCSITarget.CreateLu should have comment or be unexported (golint)
    • Line 160: warning: exported method ISCSITarget.GetLu should have comment or be unexported (golint)
    • Line 163: warning: exported method ISCSITarget.CommandNotify should have comment or be unexported (golint)
    • gotgt/pkg/scsi/error.go
    • Line 21: warning: exported type SCSIError should have comment or be unexported (golint)
    • Line 27: warning: exported var NO_SENSE should have comment or be unexported (golint)
    • Line 43: warning: exported var NoSenseError should have comment or be unexported (golint)
    • Line 58: warning: exported type SCSISubError should have comment or be unexported (golint)
    • Line 61: warning: comment on exported var NO_ADDITIONAL_SENSE should be of the form "NO_ADDITIONAL_SENSE ..." (golint)
    • Line 63: warning: exported var ASC_MARK should have comment or be unexported (golint)
    • Line 70: warning: comment on exported var ASC_WRITE_ERROR should be of the form "ASC_WRITE_ERROR ..." (golint)
    • Line 77: warning: comment on exported var ASC_CAUSE_NOT_REPORTABLE should be of the form "ASC_CAUSE_NOT_REPORTABLE ..." (golint)
    • Line 86: warning: comment on exported var ASC_UNRECOVERED_READ should be of the form "ASC_UNRECOVERED_READ ..." (golint)
    • Line 97: warning: comment on exported var ASC_COMPRESSION_CHECK should be of the form "ASC_COMPRESSION_CHECK ..." (golint)
    • Line 106: warning: comment on exported var ASC_PARAMETER_LIST_LENGTH_ERR should be of the form "ASC_PARAMETER_LIST_LENGTH_ERR ..." (golint)
    • Line 123: warning: comment on exported var ASC_NOT_READY_TO_TRANSITION should be of the form "ASC_NOT_READY_TO_TRANSITION ..." (golint)
    • Line 137: warning: comment on exported var ASC_WRITE_PROTECT should be of the form "ASC_WRITE_PROTECT ..." (golint)
    • Line 141: warning: comment on exported var ASC_MISCOMPARE_DURING_VERIFY_OPERATION should be of the form "ASC_MISCOMPARE_DURING_VERIFY_OPERATION ..." (golint)
    • gotgt/pkg/homedir/lookup.go
    • Line 9: warning: comment on exported var ErrUnsupported should be of the form "ErrUnsupported ..." (golint)
    • Line 11: warning: comment on exported var ErrNoPasswdEntries should be of the form "ErrNoPasswdEntries ..." (golint)
    • Line 13: warning: exported var ErrNoGroupEntries should have comment or be unexported (golint)
    • gotgt/pkg/api/options.go
    • Line 19: warning: exported type TargetCreateRequest should have comment or be unexported (golint)
    • Line 23: warning: exported type TargetRemoveOptions should have comment or be unexported (golint)
    • Line 28: warning: exported type TargetListOptions should have comment or be unexported (golint)
    • gotgt/pkg/config/config.go
    • Line 103: warning: exported type BackendStorage should have comment or be unexported (golint)
    • Line 111: warning: exported type ISCSIPortalInfo should have comment or be unexported (golint)
    • Line 116: warning: exported type ISCSITarget should have comment or be unexported (golint)
    • Line 121: warning: exported type Config should have comment or be unexported (golint)
    • Line 138: warning: exported function GetConfig should have comment or be unexported (golint)
    • gotgt/pkg/scsi/backingstore/cephstore/cephstore_linux.go
    • Line 1: warning: package comment should be of the form "Package cephstore ..." (golint)
    • Line 40: warning: exported type CephBackingStore should have comment or be unexported (golint)
    • Line 59: warning: exported method CephBackingStore.Open should have comment or be unexported (golint)
    • Line 71: 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 88: 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 108: 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 114: warning: exported method CephBackingStore.Close should have comment or be unexported (golint)
    • Line 121: warning: exported method CephBackingStore.Init should have comment or be unexported (golint)
    • Line 125: warning: exported method CephBackingStore.Exit should have comment or be unexported (golint)
    • Line 129: warning: exported method CephBackingStore.Size should have comment or be unexported (golint)
    • Line 144: warning: exported method CephBackingStore.DataSync should have comment or be unexported (golint)
    • Line 149: warning: exported method CephBackingStore.DataAdvise should have comment or be unexported (golint)
    • Line 153: warning: exported method CephBackingStore.Unmap should have comment or be unexported (golint)
    • gotgt/pkg/scsi/sbc.go
    • Line 17: warning: package comment should be of the form "Package scsi ..." (golint)
    • Line 32: warning: exported const PR_SPECIAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported var EnableORWrite16 should have comment or be unexported (golint)
    • Line 45: warning: exported type SBCSCSIDeviceProtocol should have comment or be unexported (golint)
    • Line 49: warning: exported method SBCSCSIDeviceProtocol.PerformCommand should have comment or be unexported (golint)
    • Line 53: warning: exported method SBCSCSIDeviceProtocol.PerformServiceAction should have comment or be unexported (golint)
    • Line 63: warning: exported method SBCSCSIDeviceProtocol.InitLu should have comment or be unexported (golint)
    • Line 128: warning: exported method SBCSCSIDeviceProtocol.ConfigLu should have comment or be unexported (golint)
    • Line 132: warning: exported method SBCSCSIDeviceProtocol.OnlineLu should have comment or be unexported (golint)
    • Line 136: warning: exported method SBCSCSIDeviceProtocol.OfflineLu should have comment or be unexported (golint)
    • Line 140: warning: exported method SBCSCSIDeviceProtocol.ExitLu should have comment or be unexported (golint)
    • Line 144: warning: exported function NewSBCDevice should have comment or be unexported (golint)
    • Line 228: warning: exported function SBCModeSelect should have comment or be unexported (golint)
    • Line 232: warning: exported function SBCModeSense should have comment or be unexported (golint)
    • Line 254: warning: comment on exported function SBCFormatUnit should be of the form "SBCFormatUnit ..." (golint)
    • Line 306: warning: exported function SBCUnmap should have comment or be unexported (golint)
    • Line 337: warning: comment on exported function SBCReadWrite should be of the form "SBCReadWrite ..." (golint)
    • Line 473: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 482: warning: exported function SBCReserve should have comment or be unexported (golint)
    • Line 489: warning: exported function SBCRelease should have comment or be unexported (golint)
    • Line 498: warning: comment on exported function SBCReadCapacity should be of the form "SBCReadCapacity ..." (golint)
    • Line 553: warning: comment on exported function SBCVerify should be of the form "SBCVerify ..." (golint)
    • Line 618: warning: comment on exported function SBCReadCapacity16 should be of the form "SBCReadCapacity16 ..." (golint)
    • Line 648: warning: exported function SBCGetLbaStatus should have comment or be unexported (golint)
    • Line 701: warning: exported function SBCServiceAction should have comment or be unexported (golint)
    • Line 714: warning: comment on exported function SBCSyncCache should be of the form "SBCSyncCache ..." (golint)
    • gotgt/pkg/scsi/scsi_pr.go
    • Line 24: warning: exported type SCSIReservationOperator should have comment or be unexported (golint)
    • Line 46: warning: exported function GetSCSIReservationOperator should have comment or be unexported (golint)
    • Line 55: warning: exported type SCSILUReservation should have comment or be unexported (golint)
    • Line 63: warning: exported type SCSILUReservationMap should have comment or be unexported (golint)
    • Line 65: warning: exported type SCSISimpleReservationOperator should have comment or be unexported (golint)
    • Line 70: warning: exported method SCSISimpleReservationOperator.InitLUReservation should have comment or be unexported (golint)
    • Line 90: warning: exported method SCSISimpleReservationOperator.GetReservation should have comment or be unexported (golint)
    • Line 112: warning: exported method SCSISimpleReservationOperator.GetPRGeneration should have comment or be unexported (golint)
    • Line 128: warning: exported method SCSISimpleReservationOperator.IncPRGeneration should have comment or be unexported (golint)
    • Line 144: warning: exported method SCSISimpleReservationOperator.GetCurrentReservation should have comment or be unexported (golint)
    • Line 159: warning: exported method SCSISimpleReservationOperator.SetCurrentReservation should have comment or be unexported (golint)
    • Line 175: warning: exported method SCSISimpleReservationOperator.GetReservationList should have comment or be unexported (golint)
    • Line 190: warning: exported method SCSISimpleReservationOperator.DeleteAndRemoveReservation should have comment or be unexported (golint)
    • Line 257: warning: exported method SCSISimpleReservationOperator.RemoveReservation should have comment or be unexported (golint)
    • Line 287: warning: exported method SCSISimpleReservationOperator.AddReservation should have comment or be unexported (golint)
    • Line 303: warning: exported method SCSISimpleReservationOperator.IsKeyExists should have comment or be unexported (golint)
    • Line 315: warning: exported method SCSISimpleReservationOperator.IsCurrentReservation should have comment or be unexported (golint)
    • Line 332: warning: exported method SCSISimpleReservationOperator.RemoveAllReservation should have comment or be unexported (golint)
    • Line 348: warning: exported method SCSISimpleReservationOperator.Save should have comment or be unexported (golint)
    • gotgt/pkg/port/iscsit/conn.go
    • Line 30: warning: exported const CONN_STATE_FREE should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported var DATAIN should have comment or be unexported (golint)
    • Line 146: warning: receiver name conn should be consistent with previous receiver name c for iscsiConnection (golint)
    • Line 151: warning: receiver name conn should be consistent with previous receiver name c for iscsiConnection (golint)
    • Line 238: warning: receiver name conn should be consistent with previous receiver name c for iscsiConnection (golint)
    • gotgt/pkg/scsi/backingstore/remote/remote.go
    • Line 28: warning: exported var Size should have comment or be unexported (golint)
    • Line 35: warning: comment on exported type RemBackingStore should be of the form "RemBackingStore ..." (with optional leading article) (golint)
    • Line 43: warning: exported function NewRemoteBackingStore should have comment or be unexported (golint)
    • Line 52: warning: exported method RemBackingStore.Open should have comment or be unexported (golint)
    • Line 65: warning: exported method RemBackingStore.Close should have comment or be unexported (golint)
    • Line 70: warning: exported method RemBackingStore.Init should have comment or be unexported (golint)
    • Line 74: warning: exported method RemBackingStore.Exit should have comment or be unexported (golint)
    • Line 78: warning: exported method RemBackingStore.Size should have comment or be unexported (golint)
    • Line 106: warning: exported method RemBackingStore.DataAdvise should have comment or be unexported (golint)
    • Line 110: warning: exported method RemBackingStore.DataSync should have comment or be unexported (golint)
    • Line 115: warning: exported method RemBackingStore.Unmap should have comment or be unexported (golint)
    • gotgt/pkg/apiserver/router/discovery/discovery.go
    • Line 1: warning: package comment should be of the form "Package discovery ..." (golint)
    • Line 54: warning: receiver name s should be consistent with previous receiver name r for discoveryRouter (golint)
    • Line 58: warning: receiver name s should be consistent with previous receiver name r for discoveryRouter (golint)
    • gotgt/pkg/scsi/backingstore.go
    • Line 29: warning: exported type BaseBackingStore should have comment or be unexported (golint)
    • Line 35: warning: exported type BackingStoreFunc should have comment or be unexported (golint)
    • Line 39: warning: exported function RegisterBackingStore should have comment or be unexported (golint)
    • Line 43: warning: exported function NewBackingStore should have comment or be unexported (golint)
    • Line 54: warning: error should be the last type when returning multiple items (golint)
    • gotgt/pkg/port/iscsit/session.go
    • Line 32: warning: exported var SESSION_NORMAL should have comment or be unexported (golint)
    • Line 36: warning: exported var DIGEST_CRC32C should have comment or be unexported (golint)
    • Line 37: warning: exported var DIGEST_NONE should have comment or be unexported (golint)
    • Line 38: warning: exported var DIGEST_ALL should have comment or be unexported (golint)
    • Line 39: warning: exported var BHS_SIZE should have comment or be unexported (golint)
    • Line 42: warning: exported const MAX_QUEUE_CMD_MIN should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported const ISCSI_PARAM_MAX_RECV_DLENGTH should have comment (or a comment on this block) or be unexported (golint)
    • Line 66: warning: comment on exported const ISCSI_PARAM_RDMA_EXTENSIONS should be of the form "ISCSI_PARAM_RDMA_EXTENSIONS ..." (golint)
    • Line 71: warning: comment on exported const ISCSI_PARAM_FIRST_LOCAL should be of the form "ISCSI_PARAM_FIRST_LOCAL ..." (golint)
    • Line 75: warning: comment on exported const ISCSI_PARAM_MAX should be of the form "ISCSI_PARAM_MAX ..." (golint)
    • Line 79: warning: exported type ISCSISessionParam should have comment or be unexported (golint)
    • Line 84: warning: exported type ISCSISessionParamList should have comment or be unexported (golint)
    • Line 93: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 102: warning: comment on exported type KeyConvFunc should be of the form "KeyConvFunc ..." (with optional leading article) (golint)
    • Line 112: warning: exported type KeyInConvFunc should have comment or be unexported (golint)
    • Line 237: warning: comment on exported type ISCSISession should be of the form "ISCSISession ..." (with optional leading article) (golint)
    • Line 309: warning: exported method ISCSITargetDriver.LookupISCSISession should have comment or be unexported (golint)
    • Line 331: warning: exported method ISCSITargetDriver.UnBindISCSISession should have comment or be unexported (golint)
    • Line 339: warning: exported method ISCSITargetDriver.BindISCSISession should have comment or be unexported (golint)
    • Line 440: warning: comment on exported method ISCSITargetDriver.NewISCSISession should be of the form "NewISCSISession ..." (golint)
    • Line 479: warning: exported method ISCSISession.LookupConnection should have comment or be unexported (golint)
    • Line 486: warning: exported method ISCSITargetDriver.ReInstatement should have comment or be unexported (golint)
    • Line 501: warning: comment on exported function GeniSCSIITNexusID should be of the form "GeniSCSIITNexusID ..." (golint)
    • gotgt/pkg/apiserver/router/lu/lu.go
    • Line 1: warning: package comment should be of the form "Package lu ..." (golint)
    • Line 55: warning: receiver name s should be consistent with previous receiver name r for luRouter (golint)
    • Line 59: warning: receiver name s should be consistent with previous receiver name r for luRouter (golint)
    • Line 63: warning: receiver name s should be consistent with previous receiver name r for luRouter (golint)
    • gotgt/pkg/scsi/cmd.go
    • Line 24: warning: comment on exported const PR_IN_READ_KEYS should be of the form "PR_IN_READ_KEYS ..." (golint)
    • Line 26: warning: exported const PR_IN_READ_RESERVATION should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: comment on exported const PR_OUT_REGISTER should be of the form "PR_OUT_REGISTER ..." (golint)
    • Line 40: warning: comment on exported const PR_LU_SCOPE should be of the form "PR_LU_SCOPE ..." (golint)
    • Line 43: warning: comment on exported const PR_TYPE_WRITE_EXCLUSIVE should be of the form "PR_TYPE_WRITE_EXCLUSIVE ..." (golint)
    • Line 53: warning: comment on exported const CDB_GROUPID_0 should be of the form "CDB_GROUPID_0 ..." (golint)
    • Line 55: warning: comment on exported const CDB_GROUPID_1 should be of the form "CDB_GROUPID_1 ..." (golint)
    • Line 57: warning: comment on exported const CDB_GROUPID_2 should be of the form "CDB_GROUPID_2 ..." (golint)
    • Line 59: warning: comment on exported const CDB_GROUPID_3 should be of the form "CDB_GROUPID_3 ..." (golint)
    • Line 61: warning: comment on exported const CDB_GROUPID_4 should be of the form "CDB_GROUPID_4 ..." (golint)
    • Line 63: warning: comment on exported const CDB_GROUPID_5 should be of the form "CDB_GROUPID_5 ..." (golint)
    • Line 65: warning: comment on exported const CDB_GROUPID_6 should be of the form "CDB_GROUPID_6 ..." (golint)
    • Line 67: warning: comment on exported const CDB_GROUPID_7 should be of the form "CDB_GROUPID_7 ..." (golint)
    • Line 71: warning: exported function SCSICDBGroupID should have comment or be unexported (golint)
    • Line 90: warning: exported const PIV_FCP should have comment (or a comment on this block) or be unexported (golint)
    • Line 104: warning: exported const VERSION_NOT_CLAIM should have comment (or a comment on this block) or be unexported (golint)
    • Line 164: warning: exported const INQUIRY_SCCS should have comment (or a comment on this block) or be unexported (golint)
    • Line 171: warning: don't use underscores in Go names; const INQUIRY_Reserved should be INQUIRYReserved (golint)
    • Line 193: warning: exported const ADDRESS_METHOD_PERIPHERAL_DEVICE should have comment (or a comment on this block) or be unexported (golint)
    • Line 225: warning: exported const NAA_IEEE_EXTD should have comment (or a comment on this block) or be unexported (golint)
    • Line 232: warning: exported var SCSIVendorID should have comment or be unexported (golint)
    • Line 237: warning: comment on exported function SCSICDBBufXLength should be of the form "SCSICDBBufXLength ..." (golint)
    • gotgt/pkg/port/iscsit/task.go
    • Line 17: warning: package comment should be of the form "Package iscsit ..." (golint)
    • Line 21: warning: exported const ISCSI_FLAG_TM_FUNC_MASK should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: comment on exported const ISCSI_TM_FUNC_ABORT_TASK should be of the form "ISCSI_TM_FUNC_ABORT_TASK ..." (golint)
    • Line 26: warning: comment on exported const ISCSI_TM_FUNC_ABORT_TASK_SET should be of the form "ISCSI_TM_FUNC_ABORT_TASK_SET ..." (golint)
    • Line 28: warning: comment on exported const ISCSI_TM_FUNC_CLEAR_ACA should be of the form "ISCSI_TM_FUNC_CLEAR_ACA ..." (golint)
    • Line 30: warning: comment on exported const ISCSI_TM_FUNC_CLEAR_TASK_SET should be of the form "ISCSI_TM_FUNC_CLEAR_TASK_SET ..." (golint)
    • Line 35: warning: comment on exported const ISCSI_TM_FUNC_TASK_REASSIGN should be of the form "ISCSI_TM_FUNC_TASK_REASSIGN ..." (golint)
    • Line 38: warning: comment on exported const ISCSI_TMF_RSP_COMPLETE should be of the form "ISCSI_TMF_RSP_COMPLETE ..." (golint)
    • Line 41: warning: comment on exported const ISCSI_TMF_RSP_NO_TASK should be of the form "ISCSI_TMF_RSP_NO_TASK ..." (golint)
    • Line 43: warning: comment on exported const ISCSI_TMF_RSP_NO_LUN should be of the form "ISCSI_TMF_RSP_NO_LUN ..." (golint)
    • Line 45: warning: comment on exported const ISCSI_TMF_RSP_TASK_ALLEGIANT should be of the form "ISCSI_TMF_RSP_TASK_ALLEGIANT ..." (golint)
    • Line 47: warning: comment on exported const ISCSI_TMF_RSP_NO_FAILOVER should be of the form "ISCSI_TMF_RSP_NO_FAILOVER ..." (golint)
    • Line 49: warning: comment on exported const ISCSI_TMF_RSP_NOT_SUPPORTED should be of the form "ISCSI_TMF_RSP_NOT_SUPPORTED ..." (golint)
    • Line 51: warning: comment on exported const ISCSI_TMF_RSP_AUTH_FAILED should be of the form "ISCSI_TMF_RSP_AUTH_FAILED ..." (golint)
    • Line 53: warning: comment on exported const ISCSI_TMF_RSP_REJECTED should be of the form "ISCSI_TMF_RSP_REJECTED ..." (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