Preparing report...

Report for github.com/dave/dst

A+    Excellent!    Found 35 issues across 68 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!


golint70%

Golint is a linter for Go source code.

    • dst/decorations.go
    • Line 45: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • dst/decorator/load.go
    • Line 16: warning: exported function Load should have comment or be unexported (golint)
    • Line 91: warning: exported type Package should have comment or be unexported (golint)
    • Line 99: warning: exported method Package.Save should have comment or be unexported (golint)
    • Line 103: warning: exported method Package.SaveWithResolver should have comment or be unexported (golint)
    • dst/decorator/resolver/guess/resolver.go
    • Line 5: warning: exported function New should have comment or be unexported (golint)
    • Line 9: warning: exported function WithMap should have comment or be unexported (golint)
    • Line 18: warning: exported method RestorerResolver.ResolvePackage should have comment or be unexported (golint)
    • dst/decorator/resolver/goast/resolver.go
    • Line 14: warning: exported function New should have comment or be unexported (golint)
    • Line 18: warning: exported function WithResolver should have comment or be unexported (golint)
    • Line 33: warning: exported method DecoratorResolver.ResolveIdent should have comment or be unexported (golint)
    • dst/gendst/data/data.go
    • Line 11: warning: exported const DSTPATH should have comment or be unexported (golint)
    • Line 13: warning: exported type Part should have comment or be unexported (golint)
    • Line 15: warning: exported var Info should have comment or be unexported (golint)
    • Line 2281: warning: exported var Exprs should have comment or be unexported (golint)
    • Line 2306: warning: exported var Stmts should have comment or be unexported (golint)
    • Line 2330: warning: exported var Decls should have comment or be unexported (golint)
    • Line 2336: warning: exported var Specs should have comment or be unexported (golint)
    • Line 2342: warning: exported type Init should have comment or be unexported (golint)
    • Line 2348: warning: exported type Decoration should have comment or be unexported (golint)
    • Line 2354: warning: exported type PathDecoration should have comment or be unexported (golint)
    • Line 2359: warning: exported type SpecialDecoration should have comment or be unexported (golint)
    • Line 2365: warning: exported type String should have comment or be unexported (golint)
    • Line 2372: warning: exported type List should have comment or be unexported (golint)
    • Line 2380: warning: exported type Map should have comment or be unexported (golint)
    • Line 2386: warning: exported type Node should have comment or be unexported (golint)
    • Line 2392: warning: exported type Token should have comment or be unexported (golint)
    • Line 2402: warning: exported type Bad should have comment or be unexported (golint)
    • Line 2415: warning: exported type Scope should have comment or be unexported (golint)
    • Line 2420: warning: exported type Object should have comment or be unexported (golint)
    • Line 2425: warning: exported type Code should have comment or be unexported (golint)
    • Line 2429: warning: exported type Basic should have comment or be unexported (golint)
    • Line 2433: warning: exported method Basic.Get should have comment or be unexported (golint)
    • Line 2437: warning: exported type Expr should have comment or be unexported (golint)
    • Line 2439: warning: exported method Expr.Get should have comment or be unexported (golint)
    • Line 2443: warning: exported type Double should have comment or be unexported (golint)
    • Line 2448: warning: exported method Double.Get should have comment or be unexported (golint)
    • Line 2455: warning: exported type TypeSpec should have comment or be unexported (golint)
    • Line 2460: warning: exported type Iface should have comment or be unexported (golint)
    • Line 2464: warning: exported method Iface.Literal should have comment or be unexported (golint)
    • Line 2468: warning: exported method Iface.TypeName should have comment or be unexported (golint)
    • Line 2472: warning: exported type Struct should have comment or be unexported (golint)
    • Line 2476: warning: exported method Struct.Literal should have comment or be unexported (golint)
    • Line 2480: warning: exported method Struct.TypeName should have comment or be unexported (golint)
    • Line 2484: warning: exported type FieldSpec should have comment or be unexported (golint)
    • Line 2489: warning: exported type Field should have comment or be unexported (golint)
    • Line 2493: warning: exported method Field.Get should have comment or be unexported (golint)
    • Line 2497: warning: exported method Field.FieldName should have comment or be unexported (golint)
    • Line 2501: warning: exported type InnerField should have comment or be unexported (golint)
    • Line 2505: warning: exported method InnerField.Get should have comment or be unexported (golint)
    • Line 2509: warning: exported method InnerField.FieldName should have comment or be unexported (golint)
    • dst/gendst/data/positions.go
    • Line 20: warning: comment on exported type A should be of the form "A ..." (with optional leading article) (golint)
    • Line 25: warning: comment on exported type A1 should be of the form "A1 ..." (with optional leading article) (golint)
    • Line 31: warning: comment on exported function B should be of the form "B ..." (golint)
    • Line 34: warning: comment on exported var C should be of the form "C ..." (golint)
    • Line 37: warning: comment on exported var D should be of the form "D ..." (golint)
    • Line 40: warning: comment on exported var E should be of the form "E ..." (golint)
    • Line 43: warning: comment on exported var F should be of the form "F ..." (golint)
    • Line 46: warning: comment on exported var G should be of the form "G ..." (golint)
    • Line 49: warning: comment on exported var H should be of the form "H ..." (golint)
    • Line 52: warning: comment on exported var H1 should be of the form "H1 ..." (golint)
    • Line 55: warning: comment on exported var H2 should be of the form "H2 ..." (golint)
    • Line 58: warning: comment on exported var H3 should be of the form "H3 ..." (golint)
    • Line 61: warning: comment on exported var H4 should be of the form "H4 ..." (golint)
    • Line 64: warning: comment on exported var H5 should be of the form "H5 ..." (golint)
    • Line 67: warning: comment on exported var J should be of the form "J ..." (golint)
    • Line 70: warning: comment on exported var L should be of the form "L ..." (golint)
    • Line 73: warning: comment on exported var N should be of the form "N ..." (golint)
    • Line 76: warning: comment on exported var O should be of the form "O ..." (golint)
    • Line 79: warning: comment on exported var P should be of the form "P ..." (golint)
    • Line 82: warning: comment on exported var Q should be of the form "Q ..." (golint)
    • Line 87: warning: comment on exported type R should be of the form "R ..." (with optional leading article) (golint)
    • Line 90: warning: comment on exported type S should be of the form "S ..." (with optional leading article) (golint)
    • Line 95: warning: comment on exported type T should be of the form "T ..." (with optional leading article) (golint)
    • Line 98: warning: comment on exported type U should be of the form "U ..." (with optional leading article) (golint)
    • Line 103: warning: comment on exported type V should be of the form "V ..." (with optional leading article) (golint)
    • Line 106: warning: comment on exported type W should be of the form "W ..." (with optional leading article) (golint)
    • Line 109: warning: comment on exported type X should be of the form "X ..." (with optional leading article) (golint)
    • Line 112: warning: comment on exported type Y should be of the form "Y ..." (with optional leading article) (golint)
    • Line 117: warning: exported function Z should have comment or be unexported (golint)
    • Line 321: warning: exported type TT should have comment or be unexported (golint)
    • Line 323: warning: exported method TT.F should have comment or be unexported (golint)
    • dst/decorator/resolver/gobuild/resolver.go
    • Line 9: warning: exported function New should have comment or be unexported (golint)
    • Line 13: warning: exported function WithContext should have comment or be unexported (golint)
    • Line 17: warning: exported function WithHints should have comment or be unexported (golint)
    • Line 21: warning: exported type RestorerResolver should have comment or be unexported (golint)
    • Line 37: warning: exported method RestorerResolver.ResolvePackage should have comment or be unexported (golint)
    • dst/decorator/resolver/gopackages/resolver.go
    • Line 10: warning: exported function New should have comment or be unexported (golint)
    • Line 14: warning: exported function WithConfig should have comment or be unexported (golint)
    • Line 18: warning: exported function WithHints should have comment or be unexported (golint)
    • Line 22: warning: exported type RestorerResolver should have comment or be unexported (golint)
    • Line 30: warning: exported method RestorerResolver.ResolvePackage should have comment or be unexported (golint)
    • dst/decorator/resolver/gotypes/resolver.go
    • Line 9: warning: exported function New should have comment or be unexported (golint)
    • Line 13: warning: exported type DecoratorResolver should have comment or be unexported (golint)
    • Line 17: warning: exported method DecoratorResolver.ResolveIdent should have comment or be unexported (golint)
    • dst/dst.go
    • Line 38: warning: comment on exported type Expr should be of the form "Expr ..." (with optional leading article) (golint)
    • Line 44: warning: comment on exported type Stmt should be of the form "Stmt ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type Decl should be of the form "Decl ..." (with optional leading article) (golint)
    • Line 228: warning: comment on exported type ChanDir should be of the form "ChanDir ..." (with optional leading article) (golint)
    • Line 234: warning: exported const SEND should have comment (or a comment on this block) or be unexported (golint)
    • dst/walk.go
    • Line 9: warning: comment on exported type Visitor should be of the form "Visitor ..." (with optional leading article) (golint)

gocyclo66%

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.

    • dst/resolve.go
    • Line 70: warning: cyclomatic complexity 17 of function NewPackage() is high (> 15) (gocyclo)
    • dst/walk.go
    • Line 51: warning: cyclomatic complexity 83 of function Walk() is high (> 15) (gocyclo)
    • dst/print.go
    • Line 140: warning: cyclomatic complexity 23 of function (*printer).print() is high (> 15) (gocyclo)
    • dst/decorator/restorer.go
    • Line 166: warning: cyclomatic complexity 63 of function (*FileRestorer).updateImports() is high (> 15) (gocyclo)
    • Line 629: warning: cyclomatic complexity 17 of function (*FileRestorer).applyDecorations() is high (> 15) (gocyclo)
    • dst/decorator/decorator-fragment.go
    • Line 209: warning: cyclomatic complexity 39 of function (*fileDecorator).link() is high (> 15) (gocyclo)
    • Line 54: warning: cyclomatic complexity 30 of function (*fileDecorator).fragment() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 18 of function (*fileDecorator).findDecoration() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!