Preparing report...

Report for github.com/mrxrsd/gojacego

A+    Excellent!    Found 15 issues across 22 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!


gocyclo86%

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.

    • gojacego/astBuilder.go
    • Line 219: warning: cyclomatic complexity 23 of function (AstBuilder).Build() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 17 of function (AstBuilder).convertOperation() is high (> 15) (gocyclo)
    • Line 55: warning: cyclomatic complexity 16 of function (AstBuilder).popOperations() is high (> 15) (gocyclo)

golint31%

Golint is a linter for Go source code.

    • gojacego/interpreter.go
    • Line 9: warning: exported type Interpreter should have comment or be unexported (golint)
    • Line 13: warning: exported type Formula should have comment or be unexported (golint)
    • Line 15: warning: exported method Interpreter.Execute should have comment or be unexported (golint)
    • Line 19: warning: exported method Interpreter.BuildFormula should have comment or be unexported (golint)
    • Line 35: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 44: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gojacego/operation.go
    • Line 3: warning: exported type OperationDataType should have comment or be unexported (golint)
    • Line 6: warning: exported const Integer should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported type OperationMetadata should have comment or be unexported (golint)
    • Line 16: warning: exported type Operation should have comment or be unexported (golint)
    • Line 22: warning: comment on exported type VariableOperation should be of the form "VariableOperation ..." (with optional leading article) (golint)
    • Line 28: warning: exported method VariableOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 30: warning: exported function NewVariableOperation should have comment or be unexported (golint)
    • Line 43: warning: comment on exported type AddOperation should be of the form "AddOperation ..." (with optional leading article) (golint)
    • Line 50: warning: exported method AddOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 52: warning: exported function NewAddOperation should have comment or be unexported (golint)
    • Line 67: warning: comment on exported type AndOperation should be of the form "AndOperation ..." (with optional leading article) (golint)
    • Line 74: warning: exported method AndOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 76: warning: exported function NewAndOperation should have comment or be unexported (golint)
    • Line 91: warning: comment on exported type ConstantOperation should be of the form "ConstantOperation ..." (with optional leading article) (golint)
    • Line 97: warning: exported method ConstantOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 99: warning: exported function NewConstantOperation should have comment or be unexported (golint)
    • Line 112: warning: comment on exported type DivisorOperation should be of the form "DivisorOperation ..." (with optional leading article) (golint)
    • Line 119: warning: exported method DivisorOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 121: warning: exported function NewDivisorOperation should have comment or be unexported (golint)
    • Line 136: warning: comment on exported type EqualOperation should be of the form "EqualOperation ..." (with optional leading article) (golint)
    • Line 143: warning: exported method EqualOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 145: warning: exported function NewEqualOperation should have comment or be unexported (golint)
    • Line 160: warning: comment on exported type ExponentiationOperation should be of the form "ExponentiationOperation ..." (with optional leading article) (golint)
    • Line 167: warning: exported method ExponentiationOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 169: warning: exported function NewExponentiationOperation should have comment or be unexported (golint)
    • Line 184: warning: comment on exported type FunctionOperation should be of the form "FunctionOperation ..." (with optional leading article) (golint)
    • Line 191: warning: exported method FunctionOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 193: warning: exported function NewFunctionOperation should have comment or be unexported (golint)
    • Line 215: warning: comment on exported type GreaterOrEqualThanOperation should be of the form "GreaterOrEqualThanOperation ..." (with optional leading article) (golint)
    • Line 222: warning: exported method GreaterOrEqualThanOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 224: warning: exported function NewGreaterOrEqualThanOperation should have comment or be unexported (golint)
    • Line 239: warning: comment on exported type GreaterThanOperation should be of the form "GreaterThanOperation ..." (with optional leading article) (golint)
    • Line 246: warning: exported method GreaterThanOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 248: warning: exported function NewGreaterThanOperation should have comment or be unexported (golint)
    • Line 263: warning: comment on exported type LessOrEqualThanOperation should be of the form "LessOrEqualThanOperation ..." (with optional leading article) (golint)
    • Line 270: warning: exported method LessOrEqualThanOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 272: warning: exported function NewLessOrEqualThanOperation should have comment or be unexported (golint)
    • Line 287: warning: comment on exported type LessThanOperation should be of the form "LessThanOperation ..." (with optional leading article) (golint)
    • Line 294: warning: exported method LessThanOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 296: warning: exported function NewLessThanOperation should have comment or be unexported (golint)
    • Line 311: warning: comment on exported type ModuloOperation should be of the form "ModuloOperation ..." (with optional leading article) (golint)
    • Line 318: warning: exported method ModuloOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 320: warning: exported function NewModuloOperation should have comment or be unexported (golint)
    • Line 335: warning: comment on exported type MultiplicationOperation should be of the form "MultiplicationOperation ..." (with optional leading article) (golint)
    • Line 342: warning: exported method MultiplicationOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 344: warning: exported function NewMultiplicationOperation should have comment or be unexported (golint)
    • Line 359: warning: comment on exported type NotEqualOperation should be of the form "NotEqualOperation ..." (with optional leading article) (golint)
    • Line 366: warning: exported method NotEqualOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 368: warning: exported function NewNotEqualOperation should have comment or be unexported (golint)
    • Line 383: warning: comment on exported type OrOperation should be of the form "OrOperation ..." (with optional leading article) (golint)
    • Line 390: warning: exported method OrOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 392: warning: exported function NewOrOperation should have comment or be unexported (golint)
    • Line 407: warning: comment on exported type SubtractionOperation should be of the form "SubtractionOperation ..." (with optional leading article) (golint)
    • Line 414: warning: exported method SubtractionOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 416: warning: exported function NewSubtractionOperation should have comment or be unexported (golint)
    • Line 431: warning: comment on exported type UnaryMinusOperation should be of the form "UnaryMinusOperation ..." (with optional leading article) (golint)
    • Line 437: warning: exported method UnaryMinusOperation.OperationMetadata should have comment or be unexported (golint)
    • Line 439: warning: exported function NewUnaryMinusOperation should have comment or be unexported (golint)
    • gojacego/token.go
    • Line 3: warning: comment on exported type Token should be of the form "Token ..." (with optional leading article) (golint)
    • gojacego/variableCollection.go
    • Line 8: warning: exported type VariableCollection should have comment or be unexported (golint)
    • Line 12: warning: exported type FormulaVariables should have comment or be unexported (golint)
    • Line 14: warning: exported function CreateFormulaVariables should have comment or be unexported (golint)
    • Line 29: warning: exported method FormulaVariables.Get should have comment or be unexported (golint)
    • gojacego/astBuilder_test.go
    • Line 39: warning: don't use underscores in Go names; var add_one should be addOne (golint)
    • Line 44: warning: don't use underscores in Go names; var add_two should be addTwo (golint)
    • Line 49: warning: don't use underscores in Go names; var multi_two should be multiTwo (golint)
    • Line 73: warning: don't use underscores in Go names; var add_one should be addOne (golint)
    • Line 78: warning: don't use underscores in Go names; var multi_one should be multiOne (golint)
    • Line 83: warning: don't use underscores in Go names; var multi_two should be multiTwo (golint)
    • Line 111: warning: don't use underscores in Go names; var multi_one should be multiOne (golint)
    • Line 120: warning: don't use underscores in Go names; var add_one should be addOne (golint)
    • Line 125: warning: don't use underscores in Go names; var add_two should be addTwo (golint)
    • gojacego/calculationEngine.go
    • Line 10: warning: exported type JaceOptions should have comment or be unexported (golint)
    • Line 19: warning: exported type CalculationEngine should have comment or be unexported (golint)
    • Line 28: warning: exported function NewCalculationEngine should have comment or be unexported (golint)
    • Line 39: warning: exported function NewCalculationEngineWithOptions should have comment or be unexported (golint)
    • Line 76: warning: exported method CalculationEngine.Calculate should have comment or be unexported (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 101: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 105: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 114: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 123: warning: exported method CalculationEngine.Build should have comment or be unexported (golint)
    • Line 123: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 143: warning: exported method CalculationEngine.AddFunction should have comment or be unexported (golint)
    • Line 143: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 147: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • gojacego/constantRegistry.go
    • Line 8: warning: exported type ConstantRegistry should have comment or be unexported (golint)
    • Line 19: warning: exported function NewConstantRegistry should have comment or be unexported (golint)
    • Line 26: warning: exported method ConstantRegistry.Get should have comment or be unexported (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: exported method ConstantRegistry.RegisterConstant should have comment or be unexported (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 51: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 59: warning: exported function RegistryDefaultConstants should have comment or be unexported (golint)
    • gojacego/optimizer.go
    • Line 3: warning: exported type Optimizer should have comment or be unexported (golint)
    • Line 7: warning: exported method Optimizer.Optimize should have comment or be unexported (golint)
    • Line 7: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 15: 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)
    • gojacego/tokenReader.go
    • Line 8: warning: exported type TokenReader should have comment or be unexported (golint)
    • Line 13: warning: exported function NewTokenReader should have comment or be unexported (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 239: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 248: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 253: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 257: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 261: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • gojacego/tokenType.go
    • Line 3: warning: exported type TokenType should have comment or be unexported (golint)
    • Line 6: warning: exported const INTEGER should have comment (or a comment on this block) or be unexported (golint)
    • gojacego/stack/stack.go
    • Line 6: warning: exported type Stack should have comment or be unexported (golint)
    • Line 16: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 21: warning: comment on exported method Stack.Len should be of the form "Len ..." (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: comment on exported method Stack.Peek should be of the form "Peek ..." (golint)
    • Line 27: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 35: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • gojacego/cache/cache.go
    • Line 8: warning: exported type Item should have comment or be unexported (golint)
    • Line 10: warning: exported type Memorycache should have comment or be unexported (golint)
    • Line 15: warning: exported function NewCache should have comment or be unexported (golint)
    • Line 25: warning: exported method Memorycache.Add should have comment or be unexported (golint)
    • Line 37: warning: exported method Memorycache.Get should have comment or be unexported (golint)
    • gojacego/astBuilder.go
    • Line 30: warning: exported type AstBuilder should have comment or be unexported (golint)
    • Line 39: warning: exported function NewAstBuilder should have comment or be unexported (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 86: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 91: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 99: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 106: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 135: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 219: warning: exported method AstBuilder.Build should have comment or be unexported (golint)
    • Line 219: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 307: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gojacego/functionRegistry.go
    • Line 8: warning: exported type Delegate should have comment or be unexported (golint)
    • Line 10: warning: exported type FunctionRegistry should have comment or be unexported (golint)
    • Line 15: warning: exported type FunctionInfo should have comment or be unexported (golint)
    • Line 22: warning: exported function NewFunctionRegistry should have comment or be unexported (golint)
    • Line 29: warning: exported method FunctionRegistry.Get should have comment or be unexported (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 36: warning: exported method FunctionRegistry.RegisterFunction should have comment or be unexported (golint)
    • Line 36: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 62: warning: exported function RegistryDefaultFunctions should have comment or be unexported (golint)
    • Line 81: warning: if block ends with a return statement, so drop this else and outdent its block (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!