Preparing report...

Report for github.com/derkinderfietsen/ravkav-sdk-go

A    Great!    Found 28 issues across 30 files

Tweet

gofmt96%

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!


gocyclo100%

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.

No problems detected. Good job!


golint6%

Golint is a linter for Go source code.

    • ravkav-sdk-go/commands/apdu.go
    • Line 4: warning: exported const Meta should have comment (or a comment on this block) or be unexported (golint)
    • Line 8: warning: exported type APDU should have comment or be unexported (golint)
    • Line 15: warning: comment on exported var ApplicationAPDU should be of the form "ApplicationAPDU ..." (golint)
    • Line 17: warning: exported var SelectAPDU should have comment or be unexported (golint)
    • Line 19: warning: comment on exported var APDUs should be of the form "APDUs ..." (golint)
    • ravkav-sdk-go/commands/commands.go
    • Line 7: warning: exported type Command should have comment or be unexported (golint)
    • Line 15: warning: exported function NewRead should have comment or be unexported (golint)
    • Line 31: warning: exported function NewRaw should have comment or be unexported (golint)
    • Line 39: warning: exported method Command.Name should have comment or be unexported (golint)
    • Line 43: warning: exported method Command.Kind should have comment or be unexported (golint)
    • Line 47: warning: exported method Command.Command should have comment or be unexported (golint)
    • ravkav-sdk-go/card/parsers/event.go
    • Line 32: warning: exported type Event should have comment or be unexported (golint)
    • Line 34: warning: exported function NewEvent should have comment or be unexported (golint)
    • Line 38: warning: exported method Event.Action should have comment or be unexported (golint)
    • Line 62: warning: exported method Event.TimeRealDate should have comment or be unexported (golint)
    • Line 70: warning: exported method Event.Transport should have comment or be unexported (golint)
    • ravkav-sdk-go/card/record.go
    • Line 20: warning: exported function NewRecord should have comment or be unexported (golint)
    • Line 35: warning: exported method Record.Normalized should have comment or be unexported (golint)
    • Line 39: warning: exported method Record.NormalizedVal should have comment or be unexported (golint)
    • Line 43: warning: exported method Record.SetNormalized should have comment or be unexported (golint)
    • Line 47: warning: exported method Record.SetNormalizedValue should have comment or be unexported (golint)
    • Line 51: warning: exported method Record.Bytes should have comment or be unexported (golint)
    • Line 55: warning: exported method Record.Binary should have comment or be unexported (golint)
    • Line 59: warning: exported method Record.Hex should have comment or be unexported (golint)
    • ravkav-sdk-go/card/card.go
    • Line 7: warning: exported type Records should have comment or be unexported (golint)
    • Line 12: warning: exported type Card should have comment or be unexported (golint)
    • Line 18: warning: exported function NewByReader should have comment or be unexported (golint)
    • Line 23: warning: exported method Card.GetRecords should have comment or be unexported (golint)
    • Line 27: warning: exported method Card.GetRecord should have comment or be unexported (golint)
    • Line 31: warning: exported method Card.GetMeta should have comment or be unexported (golint)
    • Line 35: warning: exported method Output.GetMeta should have comment or be unexported (golint)
    • Line 39: warning: exported method Output.GetRecords should have comment or be unexported (golint)
    • ravkav-sdk-go/card/parsers/convert.go
    • Line 9: warning: comment on exported function ParseCardResponse should be of the form "ParseCardResponse ..." (golint)
    • Line 14: warning: exported function BytesToBin should have comment or be unexported (golint)
    • Line 22: warning: exported function BinToHex should have comment or be unexported (golint)
    • Line 31: warning: exported function Hex2Int64 should have comment or be unexported (golint)
    • ravkav-sdk-go/card/parsers/contract.go
    • Line 18: warning: exported const AccessTypeParkingAndTransport should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: exported type Contract should have comment or be unexported (golint)
    • Line 53: warning: exported function NewContract should have comment or be unexported (golint)
    • Line 57: warning: exported method Contract.CalculateValidityEndDate should have comment or be unexported (golint)
    • Line 101: warning: exported method Contract.InterchangeTimeInMinutes should have comment or be unexported (golint)
    • Line 115: warning: exported method Contract.CounterValue should have comment or be unexported (golint)
    • Line 127: warning: exported method Contract.CounterDate should have comment or be unexported (golint)
    • Line 141: warning: exported method Contract.AccessType should have comment or be unexported (golint)
    • Line 153: warning: exported method Contract.CounterType should have comment or be unexported (golint)
    • Line 166: warning: exported method Contract.RestrictType should have comment or be unexported (golint)
    • Line 179: warning: exported method Contract.RestrictDuration should have comment or be unexported (golint)
    • Line 191: warning: exported method Contract.RestrictTime should have comment or be unexported (golint)
    • Line 206: warning: exported method Contract.Etta should have comment or be unexported (golint)
    • Line 222: warning: exported method Contract.InvertedDate should have comment or be unexported (golint)
    • ravkav-sdk-go/card/populate.go
    • Line 10: warning: exported type Populate should have comment or be unexported (golint)
    • Line 14: warning: comment on exported method Card.Populate should be of the form "Populate ..." (golint)
    • ravkav-sdk-go/card/parsers/en1545.go
    • Line 8: warning: exported function ParseEn1545Number should have comment or be unexported (golint)
    • Line 12: warning: exported function ParseEn1545Date should have comment or be unexported (golint)
    • Line 17: warning: exported function ParseConcatenatedDate should have comment or be unexported (golint)
    • ravkav-sdk-go/card/parsers/stream.go
    • Line 5: warning: exported type StreamReader should have comment or be unexported (golint)
    • Line 10: warning: exported function NewStreamReader should have comment or be unexported (golint)
    • Line 28: warning: exported method StreamReader.BitConditionRead should have comment or be unexported (golint)
    • Line 39: warning: exported method StreamReader.IsBitOn should have comment or be unexported (golint)
    • Line 42: warning: exported method StreamReader.SkipBits should have comment or be unexported (golint)
    • Line 46: warning: exported method StreamReader.BitsLeft should have comment or be unexported (golint)
    • ravkav-sdk-go/card/output.go
    • Line 8: warning: exported type Output should have comment or be unexported (golint)
    • Line 13: warning: comment on exported method Card.Output should be of the form "Output ..." (golint)
    • Line 33: warning: exported method Output.JSON should have comment or be unexported (golint)
    • ravkav-sdk-go/reader/reader.go
    • Line 9: warning: exported type Reader should have comment or be unexported (golint)
    • Line 14: warning: exported function NewReader should have comment or be unexported (golint)
    • Line 18: warning: exported method Reader.ListReaders should have comment or be unexported (golint)
    • Line 39: warning: exported method Reader.Connect should have comment or be unexported (golint)
    • Line 50: warning: exported method Reader.Disconnect should have comment or be unexported (golint)
    • Line 63: warning: exported method Reader.Transmit should have comment or be unexported (golint)
    • ravkav-sdk-go/card/parsers/validitylocation.go
    • Line 9: warning: exported type ValidityLocation should have comment or be unexported (golint)
    • Line 15: warning: exported function NewValidityLocation should have comment or be unexported (golint)
    • Line 19: warning: exported method ValidityLocation.Parse should have comment or be unexported (golint)
    • Line 42: warning: exported method ValidityLocation.Handle should have comment or be unexported (golint)
    • Line 46: warning: exported method ValidityLocation.Locations should have comment or be unexported (golint)
    • Line 50: warning: exported method ValidityLocation.PredefinedContractVL should have comment or be unexported (golint)
    • Line 67: warning: exported method ValidityLocation.LinesList should have comment or be unexported (golint)
    • Line 99: warning: exported method ValidityLocation.Zones should have comment or be unexported (golint)
    • Line 116: warning: exported method ValidityLocation.FareCode should have comment or be unexported (golint)
    • Line 143: warning: exported method ValidityLocation.Ride should have comment or be unexported (golint)
    • Line 165: warning: exported method ValidityLocation.RideAndRunType should have comment or be unexported (golint)
    • Line 192: warning: exported method ValidityLocation.RideAndRunId should have comment or be unexported (golint)
    • Line 219: warning: exported method ValidityLocation.RideRunAndSeat should have comment or be unexported (golint)
    • Line 256: warning: exported method ValidityLocation.RideZones should have comment or be unexported (golint)
    • Line 283: warning: exported method ValidityLocation.Parking should have comment or be unexported (golint)
    • Line 296: warning: exported method ValidityLocation.RouteSystemList should have comment or be unexported (golint)
    • Line 327: warning: exported method ValidityLocation.FareCodeExtension should have comment or be unexported (golint)
    • Line 349: warning: exported method ValidityLocation.RfuKnownSize should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.

    • ravkav-sdk-go/card/normalizers/environment.go
    • Line 21: warning: ineffectual assignment to err (ineffassign)
    • Line 22: warning: ineffectual assignment to err (ineffassign)
    • Line 23: warning: ineffectual assignment to err (ineffassign)
    • Line 24: warning: ineffectual assignment to err (ineffassign)
    • Line 25: warning: ineffectual assignment to err (ineffassign)
    • Line 26: warning: ineffectual assignment to err (ineffassign)
    • Line 27: warning: ineffectual assignment to err (ineffassign)
    • Line 28: warning: ineffectual assignment to err (ineffassign)
    • Line 29: warning: ineffectual assignment to err (ineffassign)
    • Line 30: warning: ineffectual assignment to err (ineffassign)
    • Line 31: warning: ineffectual assignment to err (ineffassign)
    • Line 32: warning: ineffectual assignment to err (ineffassign)
    • Line 33: warning: ineffectual assignment to err (ineffassign)
    • Line 34: warning: ineffectual assignment to err (ineffassign)
    • Line 35: warning: ineffectual assignment to err (ineffassign)
    • Line 36: warning: ineffectual assignment to err (ineffassign)
    • ravkav-sdk-go/card/normalizers/event.go
    • Line 18: warning: ineffectual assignment to err (ineffassign)
    • Line 19: warning: ineffectual assignment to err (ineffassign)
    • Line 20: warning: ineffectual assignment to err (ineffassign)
    • Line 21: warning: ineffectual assignment to err (ineffassign)
    • Line 22: warning: ineffectual assignment to err (ineffassign)
    • Line 23: warning: ineffectual assignment to err (ineffassign)
    • Line 24: warning: ineffectual assignment to err (ineffassign)
    • Line 25: warning: ineffectual assignment to err (ineffassign)
    • Line 26: warning: ineffectual assignment to err (ineffassign)
    • Line 32: warning: ineffectual assignment to err (ineffassign)
    • Line 33: warning: ineffectual assignment to err (ineffassign)
    • Line 34: warning: ineffectual assignment to err (ineffassign)
    • Line 35: warning: ineffectual assignment to err (ineffassign)
    • Line 36: warning: ineffectual assignment to err (ineffassign)
    • Line 37: warning: ineffectual assignment to err (ineffassign)
    • Line 41: warning: ineffectual assignment to err (ineffassign)
    • Line 47: warning: ineffectual assignment to err (ineffassign)
    • Line 48: warning: ineffectual assignment to err (ineffassign)
    • Line 49: warning: ineffectual assignment to err (ineffassign)
    • ravkav-sdk-go/card/normalizers/contract.go
    • Line 24: warning: ineffectual assignment to err (ineffassign)
    • Line 25: warning: ineffectual assignment to err (ineffassign)
    • Line 26: warning: ineffectual assignment to err (ineffassign)
    • Line 27: warning: ineffectual assignment to err (ineffassign)
    • Line 28: warning: ineffectual assignment to err (ineffassign)
    • Line 29: warning: ineffectual assignment to err (ineffassign)
    • Line 30: warning: ineffectual assignment to err (ineffassign)
    • Line 31: warning: ineffectual assignment to err (ineffassign)
    • Line 32: warning: ineffectual assignment to err (ineffassign)
    • Line 33: warning: ineffectual assignment to err (ineffassign)
    • Line 39: warning: ineffectual assignment to err (ineffassign)
    • Line 40: warning: ineffectual assignment to err (ineffassign)
    • Line 41: warning: ineffectual assignment to err (ineffassign)
    • Line 42: warning: ineffectual assignment to err (ineffassign)
    • Line 43: warning: ineffectual assignment to err (ineffassign)
    • Line 44: warning: ineffectual assignment to err (ineffassign)
    • Line 45: warning: ineffectual assignment to err (ineffassign)
    • Line 46: warning: ineffectual assignment to err (ineffassign)
    • Line 47: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!