Preparing report...

Report for github.com/robfig/soy

A+    Excellent!    Found 20 issues across 56 files

Tweet

gofmt92%

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!


gocyclo80%

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.

    • soy/parse/lexer.go
    • Line 562: warning: cyclomatic complexity 28 of function lexInsideTag() is high (> 15) (gocyclo)
    • Line 983: warning: cyclomatic complexity 18 of function scanNumber() is high (> 15) (gocyclo)
    • soy/soyhtml/exec.go
    • Line 76: warning: cyclomatic complexity 86 of function (*state).walk() is high (> 15) (gocyclo)
    • Line 573: warning: cyclomatic complexity 18 of function (*state).evalDataRef() is high (> 15) (gocyclo)
    • soy/parse/parse.go
    • Line 130: warning: cyclomatic complexity 20 of function (*tree).beginTag() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 17 of function (*tree).parseCall() is high (> 15) (gocyclo)

golint82%

Golint is a linter for Go source code.

    • soy/soymsg/soymsg.go
    • Line 73: warning: exported const PluralSpecExplicit should have comment (or a comment on this block) or be unexported (golint)
    • soy/data/convert.go
    • Line 85: warning: exported var DefaultStructOptions should have comment or be unexported (golint)
    • Line 97: warning: exported method StructOptions.Data should have comment or be unexported (golint)
    • soy/data/value.go
    • Line 29: warning: exported type Undefined should have comment or be unexported (golint)
    • Line 30: warning: exported type Null should have comment or be unexported (golint)
    • Line 31: warning: exported type Bool should have comment or be unexported (golint)
    • Line 32: warning: exported type Int should have comment or be unexported (golint)
    • Line 33: warning: exported type Float should have comment or be unexported (golint)
    • Line 34: warning: exported type String should have comment or be unexported (golint)
    • Line 35: warning: exported type List should have comment or be unexported (golint)
    • Line 36: warning: exported type Map should have comment or be unexported (golint)
    • Line 58: warning: exported method Undefined.MarshalJSON should have comment or be unexported (golint)
    • Line 59: warning: exported method Null.MarshalJSON should have comment or be unexported (golint)
    • Line 63: warning: exported method Undefined.Truthy should have comment or be unexported (golint)
    • Line 64: warning: exported method Null.Truthy should have comment or be unexported (golint)
    • Line 65: warning: exported method Bool.Truthy should have comment or be unexported (golint)
    • Line 66: warning: exported method Int.Truthy should have comment or be unexported (golint)
    • Line 67: warning: exported method Float.Truthy should have comment or be unexported (golint)
    • Line 68: warning: exported method String.Truthy should have comment or be unexported (golint)
    • Line 69: warning: exported method List.Truthy should have comment or be unexported (golint)
    • Line 70: warning: exported method Map.Truthy should have comment or be unexported (golint)
    • Line 108: warning: exported method Undefined.Equals should have comment or be unexported (golint)
    • Line 113: warning: exported method Null.Equals should have comment or be unexported (golint)
    • Line 118: warning: exported method Bool.Equals should have comment or be unexported (golint)
    • Line 125: warning: exported method String.Equals should have comment or be unexported (golint)
    • Line 132: warning: exported method List.Equals should have comment or be unexported (golint)
    • Line 139: warning: exported method Map.Equals should have comment or be unexported (golint)
    • Line 146: warning: exported method Int.Equals should have comment or be unexported (golint)
    • Line 156: warning: exported method Float.Equals should have comment or be unexported (golint)
    • soy/bundle.go
    • Line 111: warning: exported method Bundle.AddGlobalsMap should have comment or be unexported (golint)
    • soy/soyhtml/directives.go
    • Line 38: warning: comment on exported var ObligatoryPrintDirectiveNames should be of the form "ObligatoryPrintDirectiveNames ..." (golint)
    • soy/soymsg/placeholder.go
    • Line 195: warning: don't use underscores in Go names; var leadingOrTrailing_ should be leadingOrTrailing (golint)
    • Line 196: warning: don't use underscores in Go names; var consecutive_ should be consecutive (golint)
    • soy/ast/node.go
    • Line 44: warning: exported method SoyFileNode.Position should have comment or be unexported (golint)
    • Line 48: warning: exported method SoyFileNode.Children should have comment or be unexported (golint)
    • Line 74: warning: exported method ListNode.Children should have comment or be unexported (golint)
    • Line 78: warning: exported type RawTextNode should have comment or be unexported (golint)
    • Line 98: warning: exported type AutoescapeType should have comment or be unexported (golint)
    • Line 101: warning: exported const AutoescapeUnspecified should have comment (or a comment on this block) or be unexported (golint)
    • Line 120: warning: exported method TemplateNode.Children should have comment or be unexported (golint)
    • Line 167: warning: exported type SoyDocNode should have comment or be unexported (golint)
    • Line 183: warning: exported method SoyDocNode.Children should have comment or be unexported (golint)
    • Line 191: warning: comment on exported type SoyDocParamNode should be of the form "SoyDocParamNode ..." (with optional leading article) (golint)
    • Line 211: warning: exported type PrintNode should have comment or be unexported (golint)
    • Line 225: warning: exported method PrintNode.Children should have comment or be unexported (golint)
    • Line 233: warning: exported type PrintDirectiveNode should have comment or be unexported (golint)
    • Line 255: warning: exported method PrintDirectiveNode.Children should have comment or be unexported (golint)
    • Line 259: warning: exported type LiteralNode should have comment or be unexported (golint)
    • Line 268: warning: exported type CssNode should have comment or be unexported (golint)
    • Line 282: warning: exported method CssNode.Children should have comment or be unexported (golint)
    • Line 286: warning: exported type LogNode should have comment or be unexported (golint)
    • Line 295: warning: exported method LogNode.Children should have comment or be unexported (golint)
    • Line 299: warning: exported type DebuggerNode should have comment or be unexported (golint)
    • Line 307: warning: exported type LetValueNode should have comment or be unexported (golint)
    • Line 317: warning: exported method LetValueNode.Children should have comment or be unexported (golint)
    • Line 321: warning: exported type LetContentNode should have comment or be unexported (golint)
    • Line 331: warning: exported method LetContentNode.Children should have comment or be unexported (golint)
    • Line 335: warning: exported type IdentNode should have comment or be unexported (golint)
    • Line 361: warning: exported method MsgNode.Children should have comment or be unexported (golint)
    • Line 386: warning: exported type MsgPlaceholderNode should have comment or be unexported (golint)
    • Line 396: warning: exported method MsgPlaceholderNode.Children should have comment or be unexported (golint)
    • Line 400: warning: exported type MsgHtmlTagNode should have comment or be unexported (golint)
    • Line 409: warning: exported type MsgPluralNode should have comment or be unexported (golint)
    • Line 426: warning: exported method MsgPluralNode.Children should have comment or be unexported (golint)
    • Line 436: warning: exported type MsgPluralCaseNode should have comment or be unexported (golint)
    • Line 446: warning: exported method MsgPluralCaseNode.Children should have comment or be unexported (golint)
    • Line 450: warning: exported type CallNode should have comment or be unexported (golint)
    • Line 475: warning: exported method CallNode.Children should have comment or be unexported (golint)
    • Line 484: warning: exported type CallParamValueNode should have comment or be unexported (golint)
    • Line 494: warning: exported method CallParamValueNode.Children should have comment or be unexported (golint)
    • Line 498: warning: exported type CallParamContentNode should have comment or be unexported (golint)
    • Line 508: warning: exported method CallParamContentNode.Children should have comment or be unexported (golint)
    • Line 514: warning: exported type IfNode should have comment or be unexported (golint)
    • Line 534: warning: exported method IfNode.Children should have comment or be unexported (golint)
    • Line 542: warning: exported type IfCondNode should have comment or be unexported (golint)
    • Line 556: warning: exported method IfCondNode.Children should have comment or be unexported (golint)
    • Line 560: warning: exported type SwitchNode should have comment or be unexported (golint)
    • Line 574: warning: exported method SwitchNode.Children should have comment or be unexported (golint)
    • Line 582: warning: exported type SwitchCaseNode should have comment or be unexported (golint)
    • Line 599: warning: exported method SwitchCaseNode.Children should have comment or be unexported (golint)
    • Line 607: warning: comment on exported type ForNode should be of the form "ForNode ..." (with optional leading article) (golint)
    • Line 632: warning: exported method ForNode.Children should have comment or be unexported (golint)
    • Line 644: warning: exported type NullNode should have comment or be unexported (golint)
    • Line 652: warning: exported type BoolNode should have comment or be unexported (golint)
    • Line 664: warning: exported type IntNode should have comment or be unexported (golint)
    • Line 673: warning: exported type FloatNode should have comment or be unexported (golint)
    • Line 682: warning: exported type StringNode should have comment or be unexported (golint)
    • Line 692: warning: exported type GlobalNode should have comment or be unexported (golint)
    • Line 702: warning: exported type FunctionNode should have comment or be unexported (golint)
    • Line 719: warning: exported method FunctionNode.Children should have comment or be unexported (golint)
    • Line 723: warning: exported type ListLiteralNode should have comment or be unexported (golint)
    • Line 739: warning: exported method ListLiteralNode.Children should have comment or be unexported (golint)
    • Line 743: warning: exported type MapLiteralNode should have comment or be unexported (golint)
    • Line 764: warning: exported method MapLiteralNode.Children should have comment or be unexported (golint)
    • Line 774: warning: exported type DataRefNode should have comment or be unexported (golint)
    • Line 788: warning: exported method DataRefNode.Children should have comment or be unexported (golint)
    • Line 792: warning: exported type DataRefIndexNode should have comment or be unexported (golint)
    • Line 806: warning: exported type DataRefExprNode should have comment or be unexported (golint)
    • Line 820: warning: exported method DataRefExprNode.Children should have comment or be unexported (golint)
    • Line 824: warning: exported type DataRefKeyNode should have comment or be unexported (golint)
    • Line 840: warning: exported type NotNode should have comment or be unexported (golint)
    • Line 849: warning: exported method NotNode.Children should have comment or be unexported (golint)
    • Line 853: warning: exported type NegateNode should have comment or be unexported (golint)
    • Line 862: warning: exported method NegateNode.Children should have comment or be unexported (golint)
    • Line 866: warning: exported type BinaryOpNode should have comment or be unexported (golint)
    • Line 876: warning: exported method BinaryOpNode.Children should have comment or be unexported (golint)
    • Line 881: warning: exported type MulNode should have comment or be unexported (golint)
    • Line 882: warning: exported type DivNode should have comment or be unexported (golint)
    • Line 883: warning: exported type ModNode should have comment or be unexported (golint)
    • Line 884: warning: exported type AddNode should have comment or be unexported (golint)
    • Line 885: warning: exported type SubNode should have comment or be unexported (golint)
    • Line 886: warning: exported type EqNode should have comment or be unexported (golint)
    • Line 887: warning: exported type NotEqNode should have comment or be unexported (golint)
    • Line 888: warning: exported type GtNode should have comment or be unexported (golint)
    • Line 889: warning: exported type GteNode should have comment or be unexported (golint)
    • Line 890: warning: exported type LtNode should have comment or be unexported (golint)
    • Line 891: warning: exported type LteNode should have comment or be unexported (golint)
    • Line 892: warning: exported type OrNode should have comment or be unexported (golint)
    • Line 893: warning: exported type AndNode should have comment or be unexported (golint)
    • Line 894: warning: exported type ElvisNode should have comment or be unexported (golint)
    • Line 897: warning: exported type TernNode should have comment or be unexported (golint)
    • Line 906: warning: exported method TernNode.Children should have comment or be unexported (golint)
    • soy/soyhtml/renderer.go
    • Line 13: warning: exported var ErrTemplateNotFound should have comment or be unexported (golint)
    • Line 38: warning: receiver name t should be consistent with previous receiver name r for Renderer (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!