Preparing report...

Report for github.com/limetext/text

A    Great!    Found 12 issues across 17 files

Tweet

gofmt88%

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!


golint35%

Golint is a linter for Go source code.

    • text/naive_buffer.go
    • Line 7: warning: don't use underscores in Go names; const chunk_size should be chunkSize (golint)
    • Line 22: warning: receiver name buf should be consistent with previous receiver name b for naiveBuffer (golint)
    • Line 26: warning: receiver name buf should be consistent with previous receiver name b for naiveBuffer (golint)
    • Line 32: warning: receiver name buf should be consistent with previous receiver name b for naiveBuffer (golint)
    • Line 51: warning: receiver name buf should be consistent with previous receiver name b for naiveBuffer (golint)
    • text/node_test.go
    • Line 13: warning: don't use underscores in Go names; var complexnode_test should be complexnodeTest (golint)
    • text/regionset.go
    • Line 226: warning: comment on exported method RegionSet.AddOnChange should be of the form "AddOnChange ..." (golint)
    • Line 237: warning: comment on exported method RegionSet.ClearOnChange should be of the form "ClearOnChange ..." (golint)
    • text/buffer_test.go
    • Line 148: warning: don't use underscores in Go names; const max_word should be maxWord (golint)
    • Line 149: warning: don't use underscores in Go names; const max_line should be maxLine (golint)
    • Line 150: warning: don't use underscores in Go names; const min_word should be minWord (golint)
    • Line 151: warning: don't use underscores in Go names; const min_line should be minLine (golint)
    • Line 154: warning: don't use underscores in Go names; var word_size should be wordSize (golint)
    • Line 154: warning: don't use underscores in Go names; var line_size should be lineSize (golint)
    • Line 173: warning: don't use underscores in Go names; const testbuffer_size should be testbufferSize (golint)
    • Line 174: warning: don't use underscores in Go names; const testinsert_size should be testinsertSize (golint)
    • Line 175: warning: don't use underscores in Go names; const test_rndpoints should be testRndpoints (golint)
    • text/id.go
    • Line 17: warning: exported type Id should have comment or be unexported (golint)
    • Line 18: warning: exported type IdInterface should have comment or be unexported (golint)
    • Line 21: warning: comment on exported type HasId should be of the form "HasId ..." (with optional leading article) (golint)
    • Line 28: warning: exported method HasId.Id should have comment or be unexported (golint)
    • text/region.go
    • Line 12: warning: comment on exported type Region should be of the form "Region ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported method Region.Begin should be of the form "Begin ..." (golint)
    • Line 31: warning: comment on exported method Region.End should be of the form "End ..." (golint)
    • Line 38: warning: comment on exported method Region.Contains should be of the form "Contains ..." (golint)
    • Line 44: warning: comment on exported method Region.Covers should be of the form "Covers ..." (golint)
    • Line 49: warning: comment on exported method Region.Empty should be of the form "Empty ..." (golint)
    • Line 54: warning: comment on exported method Region.Size should be of the form "Size ..." (golint)
    • Line 59: warning: comment on exported method Region.Cover should be of the form "Cover ..." (golint)
    • Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 68: warning: comment on exported method Region.Clip should be of the form "Clip ..." (golint)
    • Line 92: warning: comment on exported method Region.Cut should be of the form "Cut ..." (golint)
    • Line 108: warning: comment on exported method Region.Intersects should be of the form "Intersects ..." (golint)
    • Line 113: warning: comment on exported method Region.Intersection should be of the form "Intersection ..." (golint)
    • Line 126: warning: comment on exported method Region.Adjust should be of the form "Adjust ..." (golint)
    • text/serialized_buffer.go
    • Line 12: warning: comment on exported type SerializedBuffer should be of the form "SerializedBuffer ..." (with optional leading article) (golint)
    • Line 12: warning: comment on exported type SerializedOperation should be of the form "SerializedOperation ..." (with optional leading article) (golint)
    • Line 29: warning: exported method SerializedBuffer.Close should have comment or be unexported (golint)
    • Line 56: warning: exported method SerializedBuffer.Size should have comment or be unexported (golint)
    • Line 61: 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)
    • Line 66: warning: exported method SerializedBuffer.SubstrR should have comment or be unexported (golint)
    • Line 71: 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)
    • Line 77: warning: exported method SerializedBuffer.InsertR should have comment or be unexported (golint)
    • Line 86: warning: exported method SerializedBuffer.Erase should have comment or be unexported (golint)
    • Line 95: warning: exported method SerializedBuffer.Index should have comment or be unexported (golint)
    • Line 100: 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)
    • Line 106: warning: exported method SerializedBuffer.RowCol should have comment or be unexported (golint)
    • Line 111: 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)
    • Line 117: warning: exported method SerializedBuffer.TextPoint should have comment or be unexported (golint)
    • Line 122: 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)
    • text/settings.go
    • Line 15: warning: comment on exported type HasSettings should be of the form "HasSettings ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type SettingsInterface should be of the form "SettingsInterface ..." (with optional leading article) (golint)
    • Line 25: warning: exported type OnChangeCallback should have comment or be unexported (golint)
    • Line 27: warning: exported type Settings should have comment or be unexported (golint)
    • Line 36: warning: exported method HasSettings.Settings should have comment or be unexported (golint)
    • Line 43: warning: exported function NewSettings should have comment or be unexported (golint)
    • Line 51: warning: comment on exported method Settings.Parent should be of the form "Parent ..." (golint)
    • Line 58: warning: exported method Settings.UnmarshalJSON should have comment or be unexported (golint)
    • Line 79: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 89: warning: exported method Settings.MarshalJSON should have comment or be unexported (golint)
    • Line 95: warning: comment on exported method Settings.SetParent should be of the form "SetParent ..." (golint)
    • Line 109: warning: comment on exported method Settings.AddOnChange should be of the form "AddOnChange ..." (golint)
    • Line 120: warning: comment on exported method Settings.ClearOnChange should be of the form "ClearOnChange ..." (golint)
    • Line 144: warning: exported method Settings.Int should have comment or be unexported (golint)
    • Line 173: warning: exported method Settings.Bool should have comment or be unexported (golint)
    • Line 181: warning: comment on exported method Settings.Set should be of the form "Set ..." (golint)
    • Line 190: warning: comment on exported method Settings.Has should be of the form "Has ..." (golint)
    • Line 205: warning: comment on exported method Settings.Erase should be of the form "Erase ..." (golint)
    • text/util.go
    • Line 7: warning: comment on exported function Min should be of the form "Min ..." (golint)
    • Line 15: warning: comment on exported function Max should be of the form "Max ..." (golint)
    • Line 23: warning: comment on exported function Clamp should be of the form "Clamp ..." (golint)
    • Line 28: warning: comment on exported function Abs should be of the form "Abs ..." (golint)
    • text/buffer.go
    • Line 50: warning: comment on exported type BufferObserver should be of the form "BufferObserver ..." (with optional leading article) (golint)
    • Line 63: warning: don't use underscores in Go names; interface method parameter changed_buffer should be changedBuffer (golint)
    • Line 63: warning: don't use underscores in Go names; interface method parameter region_removed should be regionRemoved (golint)
    • Line 63: warning: don't use underscores in Go names; interface method parameter data_removed should be dataRemoved (golint)
    • Line 71: warning: don't use underscores in Go names; interface method parameter changed_buffer should be changedBuffer (golint)
    • Line 71: warning: don't use underscores in Go names; interface method parameter region_inserted should be regionInserted (golint)
    • Line 71: warning: don't use underscores in Go names; interface method parameter data_inserted should be dataInserted (golint)
    • Line 74: warning: comment on exported type Buffer should be of the form "Buffer ..." (with optional leading article) (golint)
    • Line 140: warning: exported var ErrObserverAlreadyAdded should have comment or be unexported (golint)
    • Line 147: warning: comment on exported function NewBuffer should be of the form "NewBuffer ..." (golint)
    • Line 251: warning: receiver name buf should be consistent with previous receiver name b for buffer (golint)
    • Line 257: warning: receiver name buf should be consistent with previous receiver name b for buffer (golint)
    • Line 274: warning: receiver name buf should be consistent with previous receiver name b for buffer (golint)
    • Line 282: warning: receiver name buf should be consistent with previous receiver name b for buffer (golint)

gocyclo82%

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.

    • text/buffer.go
    • Line 396: warning: cyclomatic complexity 16 of function (*buffer).Word() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


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!