Preparing report...

Report for github.com/swamp/opcodes

A    Great!    Found 35 issues across 38 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!


gocyclo97%

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.


golint10%

Golint is a linter for Go source code.

    • opcodes/type/program_counter.go
    • Line 10: warning: exported type DeltaPC should have comment or be unexported (golint)
    • Line 12: warning: exported type ProgramCounter should have comment or be unexported (golint)
    • Line 20: warning: exported function NewProgramCounter should have comment or be unexported (golint)
    • Line 24: warning: exported method ProgramCounter.Add should have comment or be unexported (golint)
    • Line 28: warning: exported method ProgramCounter.Value should have comment or be unexported (golint)
    • Line 32: warning: exported method ProgramCounter.IsAfter should have comment or be unexported (golint)
    • Line 36: warning: exported method ProgramCounter.Delta should have comment or be unexported (golint)
    • opcodes/instruction/case_pattern_matching.go
    • Line 14: warning: exported type CasePatternMatchingJump should have comment or be unexported (golint)
    • Line 19: warning: exported function NewCasePatternMatchingJump should have comment or be unexported (golint)
    • Line 27: warning: exported type CasePatternMatching should have comment or be unexported (golint)
    • Line 32: warning: exported function NewCasePatternMatching should have comment or be unexported (golint)
    • opcodes/opcode/octet_block.go
    • Line 14: warning: exported type OctetBlock should have comment or be unexported (golint)
    • Line 18: warning: exported function NewOctetBlock should have comment or be unexported (golint)
    • Line 22: warning: exported method OctetBlock.Octets should have comment or be unexported (golint)
    • Line 26: warning: exported method OctetBlock.Replace should have comment or be unexported (golint)
    • Line 30: warning: exported method OctetBlock.FixUpLabelInject should have comment or be unexported (golint)
    • Line 46: warning: exported method OctetBlock.FixUpLabelInjects should have comment or be unexported (golint)
    • opcodes/opcode/opcode_stream.go
    • Line 13: warning: exported type OpCodeStream should have comment or be unexported (golint)
    • Line 18: warning: exported function NewOpCodeStream should have comment or be unexported (golint)
    • Line 22: warning: exported method OpCodeStream.LabelInjects should have comment or be unexported (golint)
    • Line 26: warning: exported method OpCodeStream.Octets should have comment or be unexported (golint)
    • Line 34: warning: exported method OpCodeStream.Register should have comment or be unexported (golint)
    • Line 38: warning: exported method OpCodeStream.Field should have comment or be unexported (golint)
    • Line 42: warning: exported method OpCodeStream.EnumValue should have comment or be unexported (golint)
    • Line 50: warning: exported method OpCodeStream.DeltaPC should have comment or be unexported (golint)
    • Line 59: warning: exported method OpCodeStream.Label should have comment or be unexported (golint)
    • Line 64: warning: exported method OpCodeStream.LabelWithOffset should have comment or be unexported (golint)
    • Line 69: warning: exported method OpCodeStream.Count should have comment or be unexported (golint)
    • Line 73: warning: exported method OpCodeStream.TypeIDConstant should have comment or be unexported (golint)
    • Line 78: warning: exported method OpCodeStream.Command should have comment or be unexported (golint)
    • opcodes/type/label.go
    • Line 10: warning: exported type Label should have comment or be unexported (golint)
    • Line 16: warning: exported function NewLabelDefined should have comment or be unexported (golint)
    • Line 20: warning: exported function NewLabel should have comment or be unexported (golint)
    • Line 32: warning: exported method Label.IsDefined should have comment or be unexported (golint)
    • Line 36: warning: exported method Label.DefinedProgramCounter should have comment or be unexported (golint)
    • Line 44: warning: exported method Label.Define should have comment or be unexported (golint)
    • opcodes/instruction/unary_operator.go
    • Line 8: warning: exported type UnaryOperatorType should have comment or be unexported (golint)
    • Line 11: warning: exported const UnaryOperatorBitwiseNot should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported function UnaryOperatorToOpCode should have comment or be unexported (golint)
    • opcodes/instruction/update_struct.go
    • Line 14: warning: exported type CopyToFieldInfo should have comment or be unexported (golint)
    • Line 23: warning: exported type UpdateStruct should have comment or be unexported (golint)
    • Line 29: warning: exported function NewUpdateStruct should have comment or be unexported (golint)
    • opcodes/opcode/label_inject.go
    • Line 12: warning: exported type LabelInject should have comment or be unexported (golint)
    • Line 19: warning: exported function NewLabelInject should have comment or be unexported (golint)
    • Line 24: warning: exported function NewLabelInjectWithOffset should have comment or be unexported (golint)
    • Line 30: warning: exported method LabelInject.ReferencedLabel should have comment or be unexported (golint)
    • Line 34: warning: exported method LabelInject.ForwardDeltaPC should have comment or be unexported (golint)
    • Line 44: warning: exported method LabelInject.LocatedAtPosition should have comment or be unexported (golint)
    • opcodes/opcode/virtual_label.go
    • Line 15: warning: exported type VirtualLabel should have comment or be unexported (golint)
    • Line 19: warning: exported function NewVirtualLabel should have comment or be unexported (golint)
    • Line 23: warning: exported method VirtualLabel.Label should have comment or be unexported (golint)
    • opcodes/type/field.go
    • Line 10: warning: exported type Field should have comment or be unexported (golint)
    • Line 14: warning: exported method Field.Value should have comment or be unexported (golint)
    • Line 18: warning: exported function NewField should have comment or be unexported (golint)
    • opcodes/type/register.go
    • Line 10: warning: exported type Register should have comment or be unexported (golint)
    • Line 14: warning: exported function NewRegister should have comment or be unexported (golint)
    • Line 18: warning: exported method Register.Value should have comment or be unexported (golint)
    • opcodes/instruction/enum_case.go
    • Line 14: warning: exported type EnumCaseJump should have comment or be unexported (golint)
    • Line 20: warning: exported function NewEnumCaseJump should have comment or be unexported (golint)
    • Line 28: warning: exported type EnumCase should have comment or be unexported (golint)
    • Line 33: warning: exported function NewEnumCase should have comment or be unexported (golint)
    • opcodes/instruction/commands.go
    • Line 8: warning: exported type Commands should have comment or be unexported (golint)
    • Line 11: warning: exported const CmdCreateStruct should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: comment on exported const CmdIntEqual should be of the form "CmdIntEqual ..." (golint)
    • Line 39: warning: comment on exported const CmdIntBitwiseAnd should be of the form "CmdIntBitwiseAnd ..." (golint)
    • Line 63: warning: exported function OpcodeToName should have comment or be unexported (golint)
    • opcodes/opcode/opcodes.go
    • Line 15: warning: exported type OpCode should have comment or be unexported (golint)
    • Line 17: warning: exported type Count should have comment or be unexported (golint)
    • Line 19: warning: exported function DeltaProgramCounter should have comment or be unexported (golint)
    • Line 28: warning: exported type Instruction should have comment or be unexported (golint)
    • opcodes/opcode/instruction_stream.go
    • Line 15: warning: exported type Stream should have comment or be unexported (golint)
    • Line 20: warning: exported function NewStream should have comment or be unexported (golint)
    • Line 32: warning: exported method Stream.CreateLabel should have comment or be unexported (golint)
    • Line 39: warning: exported method Stream.CreateStruct should have comment or be unexported (golint)
    • Line 46: warning: exported method Stream.StructSplit should have comment or be unexported (golint)
    • Line 53: warning: exported method Stream.CreateList should have comment or be unexported (golint)
    • Line 60: warning: exported method Stream.UpdateStruct should have comment or be unexported (golint)
    • Line 67: warning: exported method Stream.GetStruct should have comment or be unexported (golint)
    • Line 74: warning: exported method Stream.EnumCase should have comment or be unexported (golint)
    • Line 82: warning: exported method Stream.CasePatternMatching should have comment or be unexported (golint)
    • Line 90: warning: exported method Stream.RegCopy should have comment or be unexported (golint)
    • Line 97: warning: exported method Stream.TailCall should have comment or be unexported (golint)
    • Line 103: warning: exported method Stream.Call should have comment or be unexported (golint)
    • Line 110: warning: exported method Stream.Curry should have comment or be unexported (golint)
    • Line 117: warning: exported method Stream.Enum should have comment or be unexported (golint)
    • Line 124: warning: exported method Stream.Return should have comment or be unexported (golint)
    • Line 130: warning: exported method Stream.CallExternal should have comment or be unexported (golint)
    • Line 137: warning: exported method Stream.ListConj should have comment or be unexported (golint)
    • Line 144: warning: exported method Stream.Jump should have comment or be unexported (golint)
    • Line 150: warning: exported method Stream.Label should have comment or be unexported (golint)
    • Line 156: warning: exported method Stream.BranchFalse should have comment or be unexported (golint)
    • Line 162: warning: exported method Stream.BranchTrue should have comment or be unexported (golint)
    • Line 168: warning: exported method Stream.BinaryOperator should have comment or be unexported (golint)
    • Line 177: warning: exported method Stream.ListAppend should have comment or be unexported (golint)
    • Line 184: warning: exported method Stream.StringAppend should have comment or be unexported (golint)
    • Line 191: warning: exported method Stream.IntUnaryOperator should have comment or be unexported (golint)
    • Line 199: warning: exported method Stream.Serialize 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!