Preparing report...

Report for github.com/gotpl/gtfmt

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


gocyclo50%

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.

    • gtfmt/internal/parse/parse.go
    • Line 399: warning: cyclomatic complexity 16 of function (*Tree).pipeline() is high (> 15) (gocyclo)
    • Line 676: warning: cyclomatic complexity 16 of function (*Tree).term() is high (> 15) (gocyclo)

golint80%

Golint is a linter for Go source code.

    • gtfmt/internal/parse/lex.go
    • Line 262: 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)
    • gtfmt/internal/parse/node.go
    • Line 41: warning: exported method Pos.Position should have comment or be unexported (golint)
    • Line 52: warning: exported const NodeText should have comment (or a comment on this block) or be unexported (golint)
    • Line 104: warning: exported method ListNode.CopyList should have comment or be unexported (golint)
    • Line 115: warning: exported method ListNode.Copy should have comment or be unexported (golint)
    • Line 139: warning: exported method TextNode.Copy should have comment or be unexported (golint)
    • Line 185: warning: exported method PipeNode.CopyPipe should have comment or be unexported (golint)
    • Line 200: warning: exported method PipeNode.Copy should have comment or be unexported (golint)
    • Line 228: warning: exported method ActionNode.Copy should have comment or be unexported (golint)
    • Line 268: warning: exported method CommandNode.Copy should have comment or be unexported (golint)
    • Line 316: warning: exported method IdentifierNode.Copy should have comment or be unexported (golint)
    • Line 348: warning: exported method VariableNode.Copy should have comment or be unexported (golint)
    • Line 363: warning: exported method DotNode.Type should have comment or be unexported (golint)
    • Line 378: warning: exported method DotNode.Copy should have comment or be unexported (golint)
    • Line 393: warning: exported method NilNode.Type should have comment or be unexported (golint)
    • Line 408: warning: exported method NilNode.Copy should have comment or be unexported (golint)
    • Line 438: warning: exported method FieldNode.Copy should have comment or be unexported (golint)
    • Line 484: warning: exported method ChainNode.Copy should have comment or be unexported (golint)
    • Line 511: warning: exported method BoolNode.Copy should have comment or be unexported (golint)
    • Line 644: warning: exported method NumberNode.Copy should have comment or be unexported (golint)
    • Line 671: warning: exported method StringNode.Copy should have comment or be unexported (golint)
    • Line 760: warning: exported method BranchNode.Copy should have comment or be unexported (golint)
    • Line 782: warning: exported method IfNode.Copy should have comment or be unexported (golint)
    • Line 795: warning: exported method RangeNode.Copy should have comment or be unexported (golint)
    • Line 808: warning: exported method WithNode.Copy should have comment or be unexported (golint)
    • Line 837: warning: exported method TemplateNode.Copy should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign70%

IneffAssign detects ineffectual assignments in Go code.

    • gtfmt/main.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/gotpl/gtfmt/cli (invalid package name: "") (ineffassign)
    • gtfmt/cli/cli.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: could not import github.com/gotpl/gtfmt/gtfmt (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/gotpl/gtfmt/gtfmt (invalid package name: "") (ineffassign)
    • gtfmt/gtfmt/fmt.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/gotpl/gtfmt/internal/parse (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/gotpl/gtfmt/internal/parse (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!