Preparing report...

Report for github.com/mjl-/duit

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


gocyclo83%

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.

    • duit/field.go
    • Line 364: warning: cyclomatic complexity 36 of function (*Field).Key() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 26 of function (*Field).Draw() is high (> 15) (gocyclo)
    • Line 223: warning: cyclomatic complexity 23 of function expandSelection() is high (> 15) (gocyclo)
    • duit/box.go
    • Line 44: warning: cyclomatic complexity 24 of function (*Box).Layout() is high (> 15) (gocyclo)
    • duit/edit.go
    • Line 1128: warning: cyclomatic complexity 49 of function (*Edit).Key() is high (> 15) (gocyclo)
    • Line 735: warning: cyclomatic complexity 47 of function (*Edit).Mouse() is high (> 15) (gocyclo)
    • Line 449: warning: cyclomatic complexity 40 of function (*Edit).Draw() is high (> 15) (gocyclo)
    • duit/gridlist.go
    • Line 87: warning: cyclomatic complexity 45 of function (*Gridlist).columnWidths() is high (> 15) (gocyclo)
    • Line 539: warning: cyclomatic complexity 27 of function (*Gridlist).Key() is high (> 15) (gocyclo)
    • Line 429: warning: cyclomatic complexity 27 of function (*Gridlist).Mouse() is high (> 15) (gocyclo)
    • Line 323: warning: cyclomatic complexity 23 of function (*Gridlist).Draw() is high (> 15) (gocyclo)
    • duit/edithist.go
    • Line 182: warning: cyclomatic complexity 21 of function (*text).ReplaceHist() is high (> 15) (gocyclo)
    • duit/split.go
    • Line 73: warning: cyclomatic complexity 20 of function (*Split).Layout() is high (> 15) (gocyclo)
    • duit/list.go
    • Line 131: warning: cyclomatic complexity 16 of function (*List).Key() is high (> 15) (gocyclo)
    • duit/editvi.go
    • Line 336: warning: cyclomatic complexity 51 of function (*Edit).commandKey() is high (> 15) (gocyclo)
    • Line 80: warning: cyclomatic complexity 34 of function (*Edit).commandMove() is high (> 15) (gocyclo)
    • Line 230: warning: cyclomatic complexity 28 of function (*Edit).visualKey() is high (> 15) (gocyclo)
    • duit/grid.go
    • Line 27: warning: cyclomatic complexity 34 of function (*Grid).Layout() is high (> 15) (gocyclo)

golint64%

Golint is a linter for Go source code.

    • duit/buttongroup.go
    • Line 32: warning: exported method Buttongroup.Layout should have comment or be unexported (golint)
    • Line 55: warning: exported method Buttongroup.Draw should have comment or be unexported (golint)
    • Line 117: warning: exported method Buttongroup.Mouse should have comment or be unexported (golint)
    • Line 137: warning: exported method Buttongroup.Key should have comment or be unexported (golint)
    • Line 170: warning: exported method Buttongroup.FirstFocus should have comment or be unexported (golint)
    • Line 176: warning: exported method Buttongroup.Focus should have comment or be unexported (golint)
    • Line 183: warning: exported method Buttongroup.Mark should have comment or be unexported (golint)
    • Line 187: warning: exported method Buttongroup.Print should have comment or be unexported (golint)
    • duit/checkbox.go
    • Line 37: warning: exported method Checkbox.Layout should have comment or be unexported (golint)
    • Line 45: warning: exported method Checkbox.Draw should have comment or be unexported (golint)
    • Line 81: warning: exported method Checkbox.Mouse should have comment or be unexported (golint)
    • Line 105: warning: exported method Checkbox.Key should have comment or be unexported (golint)
    • Line 121: warning: exported method Checkbox.FirstFocus should have comment or be unexported (golint)
    • Line 126: warning: exported method Checkbox.Focus should have comment or be unexported (golint)
    • Line 133: warning: exported method Checkbox.Mark should have comment or be unexported (golint)
    • Line 137: warning: exported method Checkbox.Print should have comment or be unexported (golint)
    • duit/label.go
    • Line 30: warning: exported method Label.Layout should have comment or be unexported (golint)
    • Line 64: warning: exported method Label.Draw should have comment or be unexported (golint)
    • Line 75: warning: exported method Label.Mouse should have comment or be unexported (golint)
    • Line 84: warning: exported method Label.Key should have comment or be unexported (golint)
    • Line 98: warning: exported method Label.FirstFocus should have comment or be unexported (golint)
    • Line 102: warning: exported method Label.Focus should have comment or be unexported (golint)
    • Line 109: warning: exported method Label.Mark should have comment or be unexported (golint)
    • Line 113: warning: exported method Label.Print should have comment or be unexported (golint)
    • duit/field.go
    • Line 80: warning: exported method Field.Layout should have comment or be unexported (golint)
    • Line 88: warning: exported method Field.Draw should have comment or be unexported (golint)
    • Line 303: warning: exported method Field.Mouse should have comment or be unexported (golint)
    • Line 364: warning: exported method Field.Key should have comment or be unexported (golint)
    • Line 511: warning: exported method Field.FirstFocus should have comment or be unexported (golint)
    • Line 519: warning: exported method Field.Focus should have comment or be unexported (golint)
    • Line 526: warning: exported method Field.Mark should have comment or be unexported (golint)
    • Line 530: warning: exported method Field.Print should have comment or be unexported (golint)
    • duit/gridlist.go
    • Line 28: warning: exported const FitNormal should have comment (or a comment on this block) or be unexported (golint)
    • Line 309: warning: exported method Gridlist.Layout should have comment or be unexported (golint)
    • Line 323: warning: exported method Gridlist.Draw should have comment or be unexported (golint)
    • Line 429: warning: exported method Gridlist.Mouse should have comment or be unexported (golint)
    • Line 526: warning: exported method Gridlist.Selected should have comment or be unexported (golint)
    • Line 539: warning: exported method Gridlist.Key should have comment or be unexported (golint)
    • Line 644: warning: exported method Gridlist.FirstFocus should have comment or be unexported (golint)
    • Line 654: warning: exported method Gridlist.Focus should have comment or be unexported (golint)
    • Line 661: warning: exported method Gridlist.Mark should have comment or be unexported (golint)
    • Line 665: warning: exported method Gridlist.Print should have comment or be unexported (golint)
    • duit/middle.go
    • Line 37: warning: exported method Middle.Layout should have comment or be unexported (golint)
    • Line 52: warning: exported method Middle.Draw should have comment or be unexported (golint)
    • Line 58: warning: exported method Middle.Mouse should have comment or be unexported (golint)
    • Line 63: warning: exported method Middle.Key should have comment or be unexported (golint)
    • Line 68: warning: exported method Middle.FirstFocus should have comment or be unexported (golint)
    • Line 73: warning: exported method Middle.Focus should have comment or be unexported (golint)
    • Line 78: warning: exported method Middle.Mark should have comment or be unexported (golint)
    • Line 83: warning: exported method Middle.Print should have comment or be unexported (golint)
    • duit/split.go
    • Line 54: warning: exported method Split.Dimensions should have comment or be unexported (golint)
    • Line 73: warning: exported method Split.Layout should have comment or be unexported (golint)
    • Line 166: warning: exported method Split.Draw should have comment or be unexported (golint)
    • Line 170: warning: exported method Split.Mouse should have comment or be unexported (golint)
    • Line 215: warning: exported method Split.Key should have comment or be unexported (golint)
    • Line 219: warning: exported method Split.FirstFocus should have comment or be unexported (golint)
    • Line 223: warning: exported method Split.Focus should have comment or be unexported (golint)
    • Line 227: warning: exported method Split.Mark should have comment or be unexported (golint)
    • Line 231: warning: exported method Split.Print should have comment or be unexported (golint)
    • duit/box.go
    • Line 44: warning: exported method Box.Layout should have comment or be unexported (golint)
    • Line 136: warning: exported method Box.Draw should have comment or be unexported (golint)
    • Line 140: warning: exported method Box.Mouse should have comment or be unexported (golint)
    • Line 144: warning: exported method Box.Key should have comment or be unexported (golint)
    • Line 160: warning: exported method Box.FirstFocus should have comment or be unexported (golint)
    • Line 164: warning: exported method Box.Focus should have comment or be unexported (golint)
    • Line 168: warning: exported method Box.Mark should have comment or be unexported (golint)
    • Line 172: warning: exported method Box.Print should have comment or be unexported (golint)
    • duit/button.go
    • Line 37: warning: exported method Button.Layout should have comment or be unexported (golint)
    • Line 49: warning: exported method Button.Draw should have comment or be unexported (golint)
    • Line 93: warning: exported method Button.Mouse should have comment or be unexported (golint)
    • Line 110: warning: exported method Button.Key should have comment or be unexported (golint)
    • Line 121: warning: exported method Button.FirstFocus should have comment or be unexported (golint)
    • Line 126: warning: exported method Button.Focus should have comment or be unexported (golint)
    • Line 133: warning: exported method Button.Mark should have comment or be unexported (golint)
    • Line 137: warning: exported method Button.Print should have comment or be unexported (golint)
    • duit/duit.go
    • Line 20: warning: exported const BorderSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported const HalignLeft should have comment (or a comment on this block) or be unexported (golint)
    • Line 47: warning: exported const ValignMiddle should have comment (or a comment on this block) or be unexported (golint)
    • Line 82: warning: exported const InputMouse should have comment (or a comment on this block) or be unexported (golint)
    • Line 102: warning: exported const Dirty should have comment (or a comment on this block) or be unexported (golint)
    • Line 182: warning: comment on exported function AppDataDir should be of the form "AppDataDir ..." (golint)
    • duit/edit.go
    • Line 26: warning: exported var EditPadding should have comment or be unexported (golint)
    • Line 387: warning: exported type ReaderReaderAt should have comment or be unexported (golint)
    • Line 430: warning: exported method Edit.Layout should have comment or be unexported (golint)
    • Line 449: warning: exported method Edit.Draw should have comment or be unexported (golint)
    • Line 672: warning: comment on exported method Edit.ExpandedText should be of the form "ExpandedText ..." (golint)
    • Line 735: warning: exported method Edit.Mouse should have comment or be unexported (golint)
    • Line 1128: warning: exported method Edit.Key should have comment or be unexported (golint)
    • Line 1324: warning: exported method Edit.FirstFocus should have comment or be unexported (golint)
    • Line 1329: warning: exported method Edit.Focus should have comment or be unexported (golint)
    • Line 1336: warning: exported method Edit.Mark should have comment or be unexported (golint)
    • Line 1340: warning: exported method Edit.Print should have comment or be unexported (golint)
    • duit/tabs.go
    • Line 37: warning: exported method Tabs.Layout should have comment or be unexported (golint)
    • Line 42: warning: exported method Tabs.Print should have comment or be unexported (golint)
    • duit/radiobutton.go
    • Line 54: warning: exported method Radiobutton.Layout should have comment or be unexported (golint)
    • Line 62: warning: exported method Radiobutton.Draw should have comment or be unexported (golint)
    • Line 133: warning: exported method Radiobutton.Mouse should have comment or be unexported (golint)
    • Line 154: warning: exported method Radiobutton.Key should have comment or be unexported (golint)
    • Line 164: warning: exported method Radiobutton.FirstFocus should have comment or be unexported (golint)
    • Line 169: warning: exported method Radiobutton.Focus should have comment or be unexported (golint)
    • Line 176: warning: exported method Radiobutton.Mark should have comment or be unexported (golint)
    • Line 180: warning: exported method Radiobutton.Print should have comment or be unexported (golint)
    • duit/grid.go
    • Line 27: warning: exported method Grid.Layout should have comment or be unexported (golint)
    • Line 158: warning: exported method Grid.Draw should have comment or be unexported (golint)
    • Line 162: warning: exported method Grid.Mouse should have comment or be unexported (golint)
    • Line 166: warning: exported method Grid.Key should have comment or be unexported (golint)
    • Line 170: warning: exported method Grid.FirstFocus should have comment or be unexported (golint)
    • Line 174: warning: exported method Grid.Focus should have comment or be unexported (golint)
    • Line 178: warning: exported method Grid.Mark should have comment or be unexported (golint)
    • Line 182: warning: exported method Grid.Print should have comment or be unexported (golint)
    • duit/list.go
    • Line 45: warning: exported method List.Layout should have comment or be unexported (golint)
    • Line 51: warning: exported method List.Draw should have comment or be unexported (golint)
    • Line 72: warning: exported method List.Mouse should have comment or be unexported (golint)
    • Line 131: warning: exported method List.Key should have comment or be unexported (golint)
    • Line 203: warning: exported method List.FirstFocus should have comment or be unexported (golint)
    • Line 209: warning: exported method List.Focus should have comment or be unexported (golint)
    • Line 216: warning: exported method List.Mark should have comment or be unexported (golint)
    • Line 220: warning: exported method List.Print should have comment or be unexported (golint)
    • duit/pick.go
    • Line 16: warning: exported method Pick.Layout should have comment or be unexported (golint)
    • Line 28: warning: exported method Pick.Draw should have comment or be unexported (golint)
    • Line 33: warning: exported method Pick.Mouse should have comment or be unexported (golint)
    • Line 37: warning: exported method Pick.Key should have comment or be unexported (golint)
    • Line 41: warning: exported method Pick.FirstFocus should have comment or be unexported (golint)
    • Line 45: warning: exported method Pick.Focus should have comment or be unexported (golint)
    • Line 49: warning: exported method Pick.Mark should have comment or be unexported (golint)
    • Line 53: warning: exported method Pick.Print should have comment or be unexported (golint)
    • duit/place.go
    • Line 32: warning: exported method Place.Layout should have comment or be unexported (golint)
    • Line 39: warning: exported method Place.Draw should have comment or be unexported (golint)
    • Line 47: warning: exported method Place.Mouse should have comment or be unexported (golint)
    • Line 51: warning: exported method Place.Key should have comment or be unexported (golint)
    • Line 55: warning: exported method Place.FirstFocus should have comment or be unexported (golint)
    • Line 59: warning: exported method Place.Focus should have comment or be unexported (golint)
    • Line 63: warning: exported method Place.Mark should have comment or be unexported (golint)
    • Line 67: warning: exported method Place.Print should have comment or be unexported (golint)
    • duit/image.go
    • Line 16: warning: exported method Image.Layout should have comment or be unexported (golint)
    • Line 26: warning: exported method Image.Draw should have comment or be unexported (golint)
    • Line 34: warning: exported method Image.Mouse should have comment or be unexported (golint)
    • Line 38: warning: exported method Image.Key should have comment or be unexported (golint)
    • Line 42: warning: exported method Image.FirstFocus should have comment or be unexported (golint)
    • Line 46: warning: exported method Image.Focus should have comment or be unexported (golint)
    • Line 53: warning: exported method Image.Mark should have comment or be unexported (golint)
    • Line 57: warning: exported method Image.Print should have comment or be unexported (golint)
    • duit/scroll.go
    • Line 32: warning: exported method Scroll.Layout should have comment or be unexported (golint)
    • Line 67: warning: exported method Scroll.Draw should have comment or be unexported (golint)
    • Line 196: warning: exported method Scroll.Mouse should have comment or be unexported (golint)
    • Line 229: warning: exported method Scroll.Key should have comment or be unexported (golint)
    • Line 284: warning: exported method Scroll.FirstFocus should have comment or be unexported (golint)
    • Line 289: warning: exported method Scroll.Focus should have comment or be unexported (golint)
    • Line 298: warning: exported method Scroll.Mark should have comment or be unexported (golint)
    • Line 317: warning: exported method Scroll.Print should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.

    • duit/edit.go
    • Line 703: warning: ineffectual assignment to eof (ineffassign)
    • Line 1317: warning: ineffectual assignment to c0 (ineffassign)
    • Line 1318: warning: ineffectual assignment to c1 (ineffassign)

misspell92%

Misspell Finds commonly misspelled English words