Preparing report...

Report for github.com/swamp/assembler

A    Great!    Found 27 issues across 29 files

Tweet

gofmt93%

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!


gocyclo96%

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.


golint6%

Golint is a linter for Go source code.

    • assembler/compiler/compiler.go
    • Line 76: warning: exported function CompileToCodeAndContext should have comment or be unexported (golint)
    • Line 92: warning: exported function CompileToCode should have comment or be unexported (golint)
    • Line 98: warning: exported function Compile should have comment or be unexported (golint)
    • assembler/lib/case_custom_type.go
    • Line 10: warning: exported type CaseConsequence should have comment or be unexported (golint)
    • Line 16: warning: exported function NewCaseConsequence should have comment or be unexported (golint)
    • Line 20: warning: exported method CaseConsequence.Label should have comment or be unexported (golint)
    • Line 24: warning: exported method CaseConsequence.InternalEnumIndex should have comment or be unexported (golint)
    • Line 32: warning: exported type Case should have comment or be unexported (golint)
    • assembler/lib/assembler.go
    • Line 17: warning: exported type CodeCommand should have comment or be unexported (golint)
    • Line 21: warning: exported type Code should have comment or be unexported (golint)
    • Line 26: warning: exported method Code.Commands should have comment or be unexported (golint)
    • Line 30: warning: exported method Code.PrintOut should have comment or be unexported (golint)
    • Line 36: warning: exported function NewCode should have comment or be unexported (golint)
    • Line 40: warning: exported type CopyVariable should have comment or be unexported (golint)
    • Line 53: warning: exported method Code.Copy should have comment or be unexported (golint)
    • Line 63: warning: exported method Code.Label should have comment or be unexported (golint)
    • Line 70: warning: exported method Code.ListAppend should have comment or be unexported (golint)
    • Line 75: warning: exported method Code.StringAppend should have comment or be unexported (golint)
    • Line 80: warning: exported method Code.ListConj should have comment or be unexported (golint)
    • Line 85: warning: exported method Code.BinaryOperator should have comment or be unexported (golint)
    • Line 90: warning: exported method Code.UnaryOperator should have comment or be unexported (golint)
    • Line 95: warning: exported method Code.Lookups should have comment or be unexported (golint)
    • Line 100: warning: exported method Code.ListLiteral should have comment or be unexported (golint)
    • Line 105: warning: exported method Code.Constructor should have comment or be unexported (golint)
    • Line 110: warning: exported method Code.StructSplit should have comment or be unexported (golint)
    • Line 115: warning: exported method Code.UpdateStruct should have comment or be unexported (golint)
    • Line 120: warning: exported method Code.Case should have comment or be unexported (golint)
    • Line 125: warning: exported method Code.CasePatternMatching should have comment or be unexported (golint)
    • Line 130: warning: exported method Code.BranchFalse should have comment or be unexported (golint)
    • Line 138: warning: exported method Code.BranchTrue should have comment or be unexported (golint)
    • Line 146: warning: exported method Code.Jump should have comment or be unexported (golint)
    • Line 154: warning: exported method Code.Return should have comment or be unexported (golint)
    • Line 159: warning: exported method Code.CopyVariable should have comment or be unexported (golint)
    • Line 164: warning: exported method Code.Call should have comment or be unexported (golint)
    • Line 168: warning: exported method Code.Recur should have comment or be unexported (golint)
    • Line 173: warning: exported method Code.CallExternal should have comment or be unexported (golint)
    • Line 178: warning: exported method Code.CreateEnum should have comment or be unexported (golint)
    • Line 183: warning: exported method Code.Curry should have comment or be unexported (golint)
    • Line 432: warning: exported method Code.Resolve should have comment or be unexported (golint)
    • assembler/lib/label.go
    • Line 14: warning: exported type Label should have comment or be unexported (golint)
    • Line 28: warning: exported method Label.SetOpLabel should have comment or be unexported (golint)
    • Line 32: warning: exported method Label.OpLabel should have comment or be unexported (golint)
    • Line 36: warning: exported method Label.OffsetLabel should have comment or be unexported (golint)
    • Line 40: warning: exported method Label.Name should have comment or be unexported (golint)
    • assembler/lib/context.go
    • Line 15: warning: exported type FunctionContextConstants should have comment or be unexported (golint)
    • Line 31: warning: exported method FunctionContextConstants.Constants should have comment or be unexported (golint)
    • Line 35: warning: exported method FunctionContextConstants.CopyConstants should have comment or be unexported (golint)
    • Line 41: warning: exported method FunctionContextConstants.AllocateStringConstant should have comment or be unexported (golint)
    • Line 56: warning: exported method FunctionContextConstants.AllocateIntegerConstant should have comment or be unexported (golint)
    • Line 71: warning: exported method FunctionContextConstants.AllocateResourceNameConstant should have comment or be unexported (golint)
    • Line 86: warning: exported method FunctionContextConstants.AllocateBooleanConstant should have comment or be unexported (golint)
    • Line 100: warning: exported method FunctionContextConstants.AllocateFunctionReferenceConstant should have comment or be unexported (golint)
    • Line 115: warning: exported method FunctionContextConstants.AllocateExternalFunctionReferenceConstant should have comment or be unexported (golint)
    • Line 147: warning: exported method FunctionContextConstants.FindStringConstant should have comment or be unexported (golint)
    • Line 158: warning: exported type FunctionRegisterLayout should have comment or be unexported (golint)
    • Line 166: warning: exported function NewFunctionRegisterLayout should have comment or be unexported (golint)
    • Line 189: warning: exported method FunctionRegisterLayout.HighestUsedRegisterValue should have comment or be unexported (golint)
    • Line 193: warning: exported method FunctionRegisterLayout.RegisterCountUsedMax should have comment or be unexported (golint)
    • Line 207: warning: exported method FunctionRegisterLayout.AddVariable should have comment or be unexported (golint)
    • Line 214: warning: exported method FunctionRegisterLayout.AddTempVariable should have comment or be unexported (golint)
    • Line 221: warning: exported method FunctionRegisterLayout.ReleaseRegister should have comment or be unexported (golint)
    • Line 242: warning: exported method FunctionRegisterLayout.ShowSummary should have comment or be unexported (golint)
    • Line 246: warning: exported type Context should have comment or be unexported (golint)
    • Line 256: warning: exported method Context.MakeScopeContext should have comment or be unexported (golint)
    • Line 263: warning: exported method Context.Parent should have comment or be unexported (golint)
    • Line 267: warning: exported method Context.Constants should have comment or be unexported (golint)
    • Line 267: warning: receiver name r should be consistent with previous receiver name c for Context (golint)
    • Line 271: warning: exported method Context.Free should have comment or be unexported (golint)
    • Line 280: warning: exported method Context.AllocateVariable should have comment or be unexported (golint)
    • Line 293: warning: exported method Context.AllocateTempVariable should have comment or be unexported (golint)
    • Line 299: warning: exported method Context.AllocateKeepParameterVariable should have comment or be unexported (golint)
    • Line 305: warning: exported method Context.FindVariable should have comment or be unexported (golint)
    • Line 313: warning: exported method Context.FreeVariable should have comment or be unexported (golint)
    • Line 319: warning: exported method Context.FreeTempVariable should have comment or be unexported (golint)
    • Line 334: warning: exported method Context.FreeVariableIfNeeded should have comment or be unexported (golint)
    • Line 358: warning: exported method Context.ShowSummary should have comment or be unexported (golint)
    • Line 368: warning: exported type FunctionRootContext should have comment or be unexported (golint)
    • Line 375: warning: exported function NewFunctionRootContext should have comment or be unexported (golint)
    • Line 391: warning: exported method FunctionRootContext.ReturnVariable should have comment or be unexported (golint)
    • Line 391: warning: receiver name r should be consistent with previous receiver name c for FunctionRootContext (golint)
    • Line 395: warning: exported method FunctionRootContext.ScopeContext should have comment or be unexported (golint)
    • Line 395: warning: receiver name r should be consistent with previous receiver name c for FunctionRootContext (golint)
    • Line 399: warning: exported method FunctionRootContext.Layouter should have comment or be unexported (golint)
    • Line 399: warning: receiver name r should be consistent with previous receiver name c for FunctionRootContext (golint)
    • Line 403: warning: exported method FunctionRootContext.Constants should have comment or be unexported (golint)
    • Line 403: warning: receiver name r should be consistent with previous receiver name c for FunctionRootContext (golint)
    • Line 407: warning: exported method FunctionRootContext.ShowSummary should have comment or be unexported (golint)
    • Line 407: warning: receiver name r should be consistent with previous receiver name c for FunctionRootContext (golint)
    • Line 411: warning: receiver name r should be consistent with previous receiver name c for FunctionRootContext (golint)
    • assembler/lib/variable.go
    • Line 14: warning: exported type TargetVariable should have comment or be unexported (golint)
    • Line 22: warning: exported type SourceVariable should have comment or be unexported (golint)
    • Line 29: warning: exported type VariableType should have comment or be unexported (golint)
    • Line 32: warning: exported const VariableTypeNormal should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type VariableNode should have comment or be unexported (golint)
    • Line 46: warning: exported type VariableImpl should have comment or be unexported (golint)
    • Line 51: warning: exported function NewVariable should have comment or be unexported (golint)
    • Line 55: warning: exported function NewKeepVariable should have comment or be unexported (golint)
    • Line 59: warning: exported function NewTempVariable should have comment or be unexported (golint)
    • Line 63: warning: exported method VariableImpl.VarType should have comment or be unexported (golint)
    • Line 67: warning: exported method VariableImpl.Free should have comment or be unexported (golint)
    • Line 71: warning: exported method VariableImpl.SomeID should have comment or be unexported (golint)
    • Line 75: warning: exported method VariableImpl.SetRegister should have comment or be unexported (golint)
    • Line 81: warning: exported method VariableImpl.Register should have comment or be unexported (golint)
    • Line 88: warning: exported method VariableImpl.RegisterIsSet should have comment or be unexported (golint)
    • Line 92: warning: exported method VariableImpl.IAmTarget should have comment or be unexported (golint)
    • assembler/lib/branch_false.go
    • Line 10: warning: exported type BranchFalse should have comment or be unexported (golint)
    • Line 19: warning: exported method BranchFalse.Condition should have comment or be unexported (golint)
    • Line 23: warning: exported method BranchFalse.Jump should have comment or be unexported (golint)
    • Line 27: warning: exported type BranchTrue should have comment or be unexported (golint)
    • Line 36: warning: exported method BranchTrue.Condition should have comment or be unexported (golint)
    • Line 40: warning: exported method BranchTrue.Jump should have comment or be unexported (golint)
    • assembler/lib/case_pattern_matching.go
    • Line 10: warning: exported type CaseConsequencePatternMatching should have comment or be unexported (golint)
    • Line 15: warning: exported function NewCaseConsequencePatternMatching should have comment or be unexported (golint)
    • Line 19: warning: exported method CaseConsequencePatternMatching.Label should have comment or be unexported (golint)
    • Line 23: warning: exported method CaseConsequencePatternMatching.LiteralVariable should have comment or be unexported (golint)
    • Line 31: warning: exported type CasePatternMatching should have comment or be unexported (golint)
    • assembler/lib/constant.go
    • Line 14: warning: exported type ConstantType should have comment or be unexported (golint)
    • Line 17: warning: exported const ConstantTypeString should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported type Constant should have comment or be unexported (golint)
    • Line 33: warning: exported method Constant.ConstantType should have comment or be unexported (golint)
    • Line 37: warning: exported method Constant.IntegerValue should have comment or be unexported (golint)
    • Line 41: warning: exported method Constant.StringValue should have comment or be unexported (golint)
    • Line 45: warning: exported method Constant.BooleanValue should have comment or be unexported (golint)
    • Line 49: warning: exported method Constant.FunctionReferenceFullyQualifiedName should have comment or be unexported (golint)
    • Line 53: warning: exported function NewStringConstant should have comment or be unexported (golint)
    • Line 57: warning: exported function NewIntegerConstant should have comment or be unexported (golint)
    • Line 61: warning: exported function NewResourceNameConstant should have comment or be unexported (golint)
    • Line 65: warning: exported function NewFunctionReferenceConstantWithDebug should have comment or be unexported (golint)
    • Line 69: warning: exported function NewExternalFunctionReferenceConstantWithDebug should have comment or be unexported (golint)
    • Line 73: warning: exported function NewBooleanConstant should have comment or be unexported (golint)
    • Line 77: warning: exported method Constant.SetRegister should have comment or be unexported (golint)
    • Line 84: warning: exported method Constant.Register should have comment or be unexported (golint)
    • Line 91: warning: exported method Constant.RegisterIsSet should have comment or be unexported (golint)
    • Line 95: warning: receiver name c should be consistent with previous receiver name v for Constant (golint)
    • Line 118: warning: receiver name c should be consistent with previous receiver name v for Constant (golint)
    • Line 126: warning: exported method Constant.SomeID should have comment or be unexported (golint)
    • assembler/lib/jump.go
    • Line 10: warning: exported type Jump should have comment or be unexported (golint)
    • Line 18: warning: exported method Jump.Jump should have comment or be unexported (golint)
    • assembler/lib/variable_name.go
    • Line 10: warning: exported type VariableName should have comment or be unexported (golint)
    • Line 14: warning: exported function NewVariableName should have comment or be unexported (golint)
    • Line 18: warning: exported method VariableName.Name 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!