Preparing report...

Report for github.com/quentinmit/go-pvaccess

A    Great!    Found 16 issues across 21 files

Tweet

gofmt90%

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!


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.

    • go-pvaccess/pvdata/values.go
    • Line 1059: warning: cyclomatic complexity 28 of function (FieldDesc).createZero() is high (> 15) (gocyclo)
    • Line 962: warning: cyclomatic complexity 18 of function (*FieldDesc).PVEncode() is high (> 15) (gocyclo)
    • Line 1005: warning: cyclomatic complexity 18 of function (*FieldDesc).PVDecode() is high (> 15) (gocyclo)

golint23%

Golint is a linter for Go source code.

    • go-pvaccess/internal/server/monitor/monitor.go
    • Line 11: warning: exported type Monitor should have comment or be unexported (golint)
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 37: warning: exported method Monitor.Watch should have comment or be unexported (golint)
    • Line 51: warning: exported method Monitor.Start should have comment or be unexported (golint)
    • Line 58: warning: exported method Monitor.Stop should have comment or be unexported (golint)
    • Line 65: warning: exported method Monitor.Ack should have comment or be unexported (golint)
    • Line 82: warning: exported method Monitor.Send should have comment or be unexported (golint)
    • Line 89: warning: exported method Monitor.Terminate should have comment or be unexported (golint)
    • go-pvaccess/internal/proto/proto.go
    • Line 12: warning: exported const MAGIC should have comment or be unexported (golint)
    • Line 15: warning: exported const FLAG_MSG_APP should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: exported type PVAccessHeader should have comment or be unexported (golint)
    • Line 34: warning: exported method PVAccessHeader.PVEncode should have comment or be unexported (golint)
    • Line 40: warning: exported method PVAccessHeader.PVDecode should have comment or be unexported (golint)
    • Line 63: warning: exported const APP_BEACON should have comment (or a comment on this block) or be unexported (golint)
    • Line 83: warning: comment on exported const CTRL_MARK_TOTAL_BYTE_SENT should be of the form "CTRL_MARK_TOTAL_BYTE_SENT ..." (golint)
    • Line 91: warning: exported type BeaconMessage should have comment or be unexported (golint)
    • Line 102: warning: exported type ConnectionValidationRequest should have comment or be unexported (golint)
    • Line 109: warning: exported type ConnectionValidationResponse should have comment or be unexported (golint)
    • Line 119: warning: exported type ConnectionValidated should have comment or be unexported (golint)
    • Line 128: warning: exported const SEARCH_REPLY_REQUIRED should have comment (or a comment on this block) or be unexported (golint)
    • Line 132: warning: exported type SearchRequest should have comment or be unexported (golint)
    • Line 147: warning: don't use underscores in Go names; type SearchRequest_Channel should be SearchRequestChannel (golint)
    • Line 147: warning: exported type SearchRequest_Channel should have comment or be unexported (golint)
    • Line 152: warning: exported type SearchResponse should have comment or be unexported (golint)
    • Line 164: warning: don't use underscores in Go names; type CreateChannelRequest_Channel should be CreateChannelRequestChannel (golint)
    • Line 164: warning: exported type CreateChannelRequest_Channel should have comment or be unexported (golint)
    • Line 168: warning: exported type CreateChannelRequest should have comment or be unexported (golint)
    • Line 172: warning: exported method CreateChannelRequest.PVEncode should have comment or be unexported (golint)
    • Line 185: warning: exported method CreateChannelRequest.PVDecode should have comment or be unexported (golint)
    • Line 199: warning: exported type CreateChannelResponse should have comment or be unexported (golint)
    • Line 206: warning: comment on exported type DestroyChannel should be of the form "DestroyChannel ..." (with optional leading article) (golint)
    • Line 223: warning: exported const CHANNEL_GET_INIT should have comment (or a comment on this block) or be unexported (golint)
    • Line 228: warning: exported type ChannelGetRequest should have comment or be unexported (golint)
    • Line 236: warning: exported method ChannelGetRequest.PVEncode should have comment or be unexported (golint)
    • Line 245: warning: exported method ChannelGetRequest.PVDecode should have comment or be unexported (golint)
    • Line 255: warning: exported type ChannelGetResponseInit should have comment or be unexported (golint)
    • Line 262: warning: exported type ChannelGetResponse should have comment or be unexported (golint)
    • Line 302: warning: exported type ChannelRPCRequest should have comment or be unexported (golint)
    • Line 308: warning: exported type ChannelRPCResponseInit should have comment or be unexported (golint)
    • Line 313: warning: exported type ChannelRPCResponse should have comment or be unexported (golint)
    • Line 331: warning: exported type ChannelMonitorRequest should have comment or be unexported (golint)
    • Line 343: warning: exported method ChannelMonitorRequest.PVEncode should have comment or be unexported (golint)
    • Line 359: warning: exported method ChannelMonitorRequest.PVDecode should have comment or be unexported (golint)
    • Line 376: warning: exported type ChannelMonitorResponseInit should have comment or be unexported (golint)
    • Line 382: warning: exported type ChannelMonitorResponse should have comment or be unexported (golint)
    • Line 391: warning: comment on exported type CancelDestroyRequest should be of the form "CancelDestroyRequest ..." (with optional leading article) (golint)
    • Line 397: warning: comment on exported type OriginTag should be of the form "OriginTag ..." (with optional leading article) (golint)
    • go-pvaccess/pvdata/value_conversion.go
    • Line 96: warning: exported type TypeIDer should have comment or be unexported (golint)
    • Line 181: warning: exported function Decode should have comment or be unexported (golint)
    • Line 194: warning: exported type FieldDescer should have comment or be unexported (golint)
    • go-pvaccess/internal/connection/connection.go
    • Line 18: warning: exported type Connection should have comment or be unexported (golint)
    • Line 30: warning: exported function New should have comment or be unexported (golint)
    • Line 48: warning: exported method Connection.ReceiveBufferSize should have comment or be unexported (golint)
    • Line 174: warning: exported type Message should have comment or be unexported (golint)
    • Line 182: warning: exported method Connection.Next should have comment or be unexported (golint)
    • go-pvaccess/pvdata/values.go
    • Line 23: warning: exported type Writer should have comment or be unexported (golint)
    • Line 29: warning: exported type EncoderState should have comment or be unexported (golint)
    • Line 37: warning: exported method EncoderState.WriteUint16 should have comment or be unexported (golint)
    • Line 42: warning: exported method EncoderState.WriteUint32 should have comment or be unexported (golint)
    • Line 47: warning: exported method EncoderState.WriteUint64 should have comment or be unexported (golint)
    • Line 52: warning: exported method EncoderState.PushWriter should have comment or be unexported (golint)
    • Line 60: warning: exported type Reader should have comment or be unexported (golint)
    • Line 65: warning: exported type DecoderState should have comment or be unexported (golint)
    • Line 74: warning: exported method DecoderState.ReadUint16 should have comment or be unexported (golint)
    • Line 81: warning: exported method DecoderState.ReadUint32 should have comment or be unexported (golint)
    • Line 88: warning: exported method DecoderState.ReadUint64 should have comment or be unexported (golint)
    • Line 95: warning: exported method DecoderState.PushReader should have comment or be unexported (golint)
    • Line 114: warning: exported type PVField should have comment or be unexported (golint)
    • Line 121: warning: exported type PVSize should have comment or be unexported (golint)
    • Line 123: warning: exported method PVSize.PVEncode should have comment or be unexported (golint)
    • Line 142: warning: exported method PVSize.PVDecode should have comment or be unexported (golint)
    • Line 173: warning: exported type PVBoolean should have comment or be unexported (golint)
    • Line 175: warning: exported method PVBoolean.PVEncode should have comment or be unexported (golint)
    • Line 181: warning: exported method PVBoolean.PVDecode should have comment or be unexported (golint)
    • Line 189: warning: exported method PVBoolean.FieldDesc should have comment or be unexported (golint)
    • Line 193: warning: exported type PVByte should have comment or be unexported (golint)
    • Line 195: warning: exported method PVByte.PVEncode should have comment or be unexported (golint)
    • Line 198: warning: exported method PVByte.PVDecode should have comment or be unexported (golint)
    • Line 206: warning: exported method PVByte.FieldDesc should have comment or be unexported (golint)
    • Line 210: warning: exported type PVUByte should have comment or be unexported (golint)
    • Line 212: warning: exported method PVUByte.PVEncode should have comment or be unexported (golint)
    • Line 215: warning: exported method PVUByte.PVDecode should have comment or be unexported (golint)
    • Line 223: warning: exported method PVUByte.FieldDesc should have comment or be unexported (golint)
    • Line 227: warning: exported type PVShort should have comment or be unexported (golint)
    • Line 229: warning: exported method PVShort.PVEncode should have comment or be unexported (golint)
    • Line 232: warning: exported method PVShort.PVDecode should have comment or be unexported (golint)
    • Line 240: warning: exported method PVShort.FieldDesc should have comment or be unexported (golint)
    • Line 244: warning: exported type PVUShort should have comment or be unexported (golint)
    • Line 246: warning: exported method PVUShort.PVEncode should have comment or be unexported (golint)
    • Line 249: warning: exported method PVUShort.PVDecode should have comment or be unexported (golint)
    • Line 257: warning: exported method PVUShort.FieldDesc should have comment or be unexported (golint)
    • Line 261: warning: exported type PVInt should have comment or be unexported (golint)
    • Line 263: warning: exported method PVInt.PVEncode should have comment or be unexported (golint)
    • Line 266: warning: exported method PVInt.PVDecode should have comment or be unexported (golint)
    • Line 274: warning: exported method PVInt.FieldDesc should have comment or be unexported (golint)
    • Line 278: warning: exported type PVUInt should have comment or be unexported (golint)
    • Line 280: warning: exported method PVUInt.PVEncode should have comment or be unexported (golint)
    • Line 283: warning: exported method PVUInt.PVDecode should have comment or be unexported (golint)
    • Line 291: warning: exported method PVUInt.FieldDesc should have comment or be unexported (golint)
    • Line 295: warning: exported type PVLong should have comment or be unexported (golint)
    • Line 297: warning: exported method PVLong.PVEncode should have comment or be unexported (golint)
    • Line 300: warning: exported method PVLong.PVDecode should have comment or be unexported (golint)
    • Line 308: warning: exported method PVLong.FieldDesc should have comment or be unexported (golint)
    • Line 312: warning: exported type PVULong should have comment or be unexported (golint)
    • Line 314: warning: exported method PVULong.PVEncode should have comment or be unexported (golint)
    • Line 317: warning: exported method PVULong.PVDecode should have comment or be unexported (golint)
    • Line 325: warning: exported method PVULong.FieldDesc should have comment or be unexported (golint)
    • Line 329: warning: exported type PVFloat should have comment or be unexported (golint)
    • Line 331: warning: exported method PVFloat.PVEncode should have comment or be unexported (golint)
    • Line 334: warning: exported method PVFloat.PVDecode should have comment or be unexported (golint)
    • Line 342: warning: exported method PVFloat.FieldDesc should have comment or be unexported (golint)
    • Line 346: warning: exported type PVDouble should have comment or be unexported (golint)
    • Line 348: warning: exported method PVDouble.PVEncode should have comment or be unexported (golint)
    • Line 351: warning: exported method PVDouble.PVDecode should have comment or be unexported (golint)
    • Line 359: warning: exported method PVDouble.FieldDesc should have comment or be unexported (golint)
    • Line 365: warning: exported type PVArray should have comment or be unexported (golint)
    • Line 372: warning: exported function NewPVFixedArray should have comment or be unexported (golint)
    • Line 379: warning: exported method PVArray.PVEncode should have comment or be unexported (golint)
    • Line 408: warning: exported method PVArray.PVDecode should have comment or be unexported (golint)
    • Line 449: warning: exported method PVArray.FieldDesc should have comment or be unexported (golint)
    • Line 468: warning: exported method PVArray.Equal should have comment or be unexported (golint)
    • Line 479: warning: comment on exported type PVString should be of the form "PVString ..." (with optional leading article) (golint)
    • Line 484: warning: exported method PVString.PVEncode should have comment or be unexported (golint)
    • Line 491: warning: exported method PVString.PVDecode should have comment or be unexported (golint)
    • Line 503: warning: exported method PVString.FieldDesc should have comment or be unexported (golint)
    • Line 510: warning: exported type PVBoundedString should have comment or be unexported (golint)
    • Line 515: warning: exported method PVBoundedString.PVEncode should have comment or be unexported (golint)
    • Line 521: warning: exported method PVBoundedString.FieldDesc should have comment or be unexported (golint)
    • Line 530: warning: exported type PVStructure should have comment or be unexported (golint)
    • Line 555: warning: comment on exported method PVStructure.PVEncode should be of the form "PVEncode ..." (golint)
    • Line 584: warning: exported method PVStructure.PVDecode should have comment or be unexported (golint)
    • Line 620: warning: exported method PVStructure.FieldDesc should have comment or be unexported (golint)
    • Line 648: warning: exported method PVStructure.Field should have comment or be unexported (golint)
    • Line 662: warning: exported method PVStructure.SubField should have comment or be unexported (golint)
    • Line 676: warning: exported type PVStructureDiff should have comment or be unexported (golint)
    • Line 681: warning: exported method PVStructureDiff.PVEncode should have comment or be unexported (golint)
    • Line 701: warning: exported method PVStructureDiff.PVDecode should have comment or be unexported (golint)
    • Line 718: warning: exported function NewPVAny should have comment or be unexported (golint)
    • Line 739: warning: exported method PVAny.PVDecode should have comment or be unexported (golint)
    • Line 756: warning: comment on exported type PVBitSet should be of the form "PVBitSet ..." (with optional leading article) (golint)
    • Line 762: warning: exported function NewBitSetWithBits should have comment or be unexported (golint)
    • Line 778: warning: exported method PVBitSet.Get should have comment or be unexported (golint)
    • Line 785: warning: exported method PVBitSet.PVEncode should have comment or be unexported (golint)
    • Line 819: warning: exported method PVBitSet.PVDecode should have comment or be unexported (golint)
    • Line 865: warning: don't use underscores in Go names; const PVStatus_OK should be PVStatusOK (golint)
    • Line 865: warning: exported const PVStatus_OK should have comment (or a comment on this block) or be unexported (golint)
    • Line 866: warning: don't use underscores in Go names; const PVStatus_WARNING should be PVStatusWARNING (golint)
    • Line 867: warning: don't use underscores in Go names; const PVStatus_ERROR should be PVStatusERROR (golint)
    • Line 868: warning: don't use underscores in Go names; const PVStatus_FATAL should be PVStatusFATAL (golint)
    • Line 871: warning: exported type PVStatus should have comment or be unexported (golint)
    • Line 877: warning: exported method PVStatus.PVEncode should have comment or be unexported (golint)
    • Line 887: warning: exported method PVStatus.PVDecode should have comment or be unexported (golint)
    • Line 914: warning: exported const NULL_TYPE_CODE should have comment (or a comment on this block) or be unexported (golint)
    • Line 920: warning: exported type StructFieldDesc should have comment or be unexported (golint)
    • Line 925: warning: exported type FieldDesc should have comment or be unexported (golint)
    • Line 938: warning: exported const BOOLEAN should have comment (or a comment on this block) or be unexported (golint)
    • Line 962: warning: exported method FieldDesc.PVEncode should have comment or be unexported (golint)
    • Line 1005: warning: exported method FieldDesc.PVDecode should have comment or be unexported (golint)
    • Line 1149: warning: exported function BoolValue should have comment or be unexported (golint)
    • Line 1157: warning: exported function IntValue should have comment or be unexported (golint)
    • go-pvaccess/internal/server/types/types.go
    • Line 14: warning: exported type ChannelLister should have comment or be unexported (golint)
    • Line 17: warning: exported type ChannelFinder should have comment or be unexported (golint)
    • Line 36: warning: exported type ChannelGetCreator should have comment or be unexported (golint)
    • Line 40: warning: exported type ChannelGeter should have comment or be unexported (golint)
    • Line 44: warning: exported type ChannelRPCCreator should have comment or be unexported (golint)
    • Line 48: warning: exported type ChannelRPCer should have comment or be unexported (golint)
    • Line 52: warning: exported type ChannelMonitorCreator should have comment or be unexported (golint)
    • Line 56: warning: exported type Nexter should have comment or be unexported (golint)
    • go-pvaccess/channels.go
    • Line 14: warning: exported type ChannelProvider should have comment or be unexported (golint)
    • Line 15: warning: exported type ChannelLister should have comment or be unexported (golint)
    • Line 16: warning: exported type ChannelFinder should have comment or be unexported (golint)
    • Line 17: warning: exported type Channel should have comment or be unexported (golint)
    • Line 18: warning: exported type ChannelGetCreator should have comment or be unexported (golint)
    • Line 19: warning: exported type ChannelGeter should have comment or be unexported (golint)
    • Line 20: warning: exported type ChannelRPCCreator should have comment or be unexported (golint)
    • Line 21: warning: exported type ChannelRPCer should have comment or be unexported (golint)
    • Line 22: warning: exported type ChannelMonitorCreator should have comment or be unexported (golint)
    • Line 23: warning: exported type Nexter should have comment or be unexported (golint)
    • Line 60: warning: receiver name c should be consistent with previous receiver name conn for serverConn (golint)
    • Line 72: warning: exported type SimpleChannel should have comment or be unexported (golint)
    • Line 81: warning: exported function NewSimpleChannel should have comment or be unexported (golint)
    • Line 89: warning: exported method SimpleChannel.Name should have comment or be unexported (golint)
    • Line 110: warning: exported method SimpleChannel.CreateChannel should have comment or be unexported (golint)
    • Line 116: warning: exported method SimpleChannel.ChannelList should have comment or be unexported (golint)
    • Line 146: warning: exported method SimpleChannel.CreateChannelMonitor should have comment or be unexported (golint)
    • Line 158: warning: exported method SimpleChannel.ChannelGet should have comment or be unexported (golint)
    • go-pvaccess/server.go
    • Line 22: warning: exported type Server should have comment or be unexported (golint)
    • Line 37: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 94: warning: exported method Server.AddChannelProvider should have comment or be unexported (golint)
    • Line 94: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)
    • Line 100: warning: exported method Server.ChannelProviders should have comment or be unexported (golint)
    • Line 100: warning: receiver name s should be consistent with previous receiver name srv for Server (golint)
    • Line 124: warning: exported const INIT should have comment (or a comment on this block) or be unexported (golint)
    • Line 257: 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)
    • go-pvaccess/internal/udpconn/udpconn.go
    • Line 1: warning: package comment should be of the form "Package udpconn ..." (golint)
    • Line 61: warning: exported function Listen should have comment or be unexported (golint)
    • Line 88: warning: exported method Listener.LocalAddr should have comment or be unexported (golint)
    • Line 265: warning: exported method Listener.Accept should have comment or be unexported (golint)
    • Line 273: warning: exported method Listener.Close should have comment or be unexported (golint)
    • Line 284: warning: exported method Listener.BroadcastConn should have comment or be unexported (golint)
    • Line 293: warning: exported method Listener.WriteMulticast should have comment or be unexported (golint)
    • Line 300: warning: exported method Listener.BroadcastSendAddresses should have comment or be unexported (golint)
    • Line 304: warning: exported method Listener.IsTappedIP should have comment or be unexported (golint)
    • Line 313: warning: exported type Conn should have comment or be unexported (golint)
    • Line 326: warning: exported method Conn.LocalAddr should have comment or be unexported (golint)
    • Line 343: warning: exported method Conn.Close should have comment or be unexported (golint)
    • go-pvaccess/internal/proto/io.go
    • Line 5: warning: exported const ALIGNMENT should have comment or be unexported (golint)
    • Line 7: warning: exported type AligningWriter should have comment or be unexported (golint)
    • Line 12: warning: exported function NewAligningWriter should have comment or be unexported (golint)
    • Line 22: warning: exported method AligningWriter.Align should have comment or be unexported (golint)
    • go-pvaccess/internal/server/status/status.go
    • Line 15: warning: exported type ChannelProviderser should have comment or be unexported (golint)
    • Line 19: warning: exported type Channel should have comment or be unexported (golint)
    • Line 23: warning: exported method Channel.Name should have comment or be unexported (golint)
    • Line 27: warning: exported method Channel.CreateChannel should have comment or be unexported (golint)
    • Line 34: warning: exported type NTScalarArray should have comment or be unexported (golint)
    • Line 38: warning: exported method NTScalarArray.TypeID should have comment or be unexported (golint)
    • Line 42: warning: exported method Channel.ChannelRPC should have comment or be unexported (golint)
    • go-pvaccess/pvdata/nt.go
    • Line 15: warning: exported type Enum should have comment or be unexported (golint)
    • Line 20: warning: exported method Enum.TypeID should have comment or be unexported (golint)
    • Line 24: warning: exported type Time should have comment or be unexported (golint)
    • Line 29: warning: exported method Time.TypeID should have comment or be unexported (golint)
    • Line 32: warning: exported method Time.PVEncode should have comment or be unexported (golint)
    • Line 37: warning: exported method Time.PVDecode should have comment or be unexported (golint)
    • Line 47: warning: exported type Alarm should have comment or be unexported (golint)
    • Line 53: warning: exported method Alarm.TypeID should have comment or be unexported (golint)
    • Line 57: warning: exported type AlarmLimit should have comment or be unexported (golint)
    • Line 72: warning: exported method AlarmLimit.TypeID should have comment or be unexported (golint)
    • Line 76: warning: comment on exported type ValueAlarm should be of the form "ValueAlarm ..." (with optional leading article) (golint)
    • Line 80: warning: exported method ValueAlarm.TypeID should have comment or be unexported (golint)
    • Line 84: warning: exported type Display should have comment or be unexported (golint)
    • Line 93: warning: exported method Display.TypeID should have comment or be unexported (golint)
    • Line 97: warning: exported type Control should have comment or be unexported (golint)
    • Line 103: warning: exported method Control.TypeID 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!