Preparing report...

Report for github.com/as/edit

A+    Excellent!    Found 8 issues across 11 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!


gocyclo90%

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.

    • edit/parse.go
    • Line 162: warning: cyclomatic complexity 49 of function parseCmd() is high (> 15) (gocyclo)

golint36%

Golint is a linter for Go source code.

    • edit/parse.go
    • Line 13: warning: exported type Print should have comment or be unexported (golint)
    • Line 17: warning: exported type Emitted should have comment or be unexported (golint)
    • Line 156: warning: exported type Sender should have comment or be unexported (golint)
    • Line 396: warning: exported type ReplaceAmp should have comment or be unexported (golint)
    • Line 398: warning: exported method ReplaceAmp.Run should have comment or be unexported (golint)
    • Line 406: warning: exported method ReplaceAmp.Gen should have comment or be unexported (golint)
    • edit/rec.go
    • Line 12: warning: exported method Recorder.WriteAt should have comment or be unexported (golint)
    • Line 15: warning: exported method Recorder.Insert should have comment or be unexported (golint)
    • Line 18: warning: exported method Recorder.Delete should have comment or be unexported (golint)
    • edit/addr.go
    • Line 11: warning: exported type Editor should have comment or be unexported (golint)
    • Line 37: warning: comment on exported type Byte should be of the form "Byte ..." (with optional leading article) (golint)
    • Line 54: warning: exported type File should have comment or be unexported (golint)
    • Line 65: warning: exported method Regexp.Back should have comment or be unexported (golint)
    • Line 66: warning: exported method Byte.Back should have comment or be unexported (golint)
    • Line 67: warning: exported method Line.Back should have comment or be unexported (golint)
    • Line 68: warning: exported method Dot.Back should have comment or be unexported (golint)
    • Line 69: warning: exported method Compound.Back should have comment or be unexported (golint)
    • Line 71: warning: exported method Compound.Set should have comment or be unexported (golint)
    • Line 89: warning: exported method Byte.Set should have comment or be unexported (golint)
    • Line 100: warning: exported method Regexp.Set should have comment or be unexported (golint)
    • Line 115: warning: exported method Line.Set should have comment or be unexported (golint)
    • Line 115: warning: receiver name r should be consistent with previous receiver name l for Line (golint)
    • Line 151: warning: exported method Dot.Set should have comment or be unexported (golint)
    • edit/cmd.go
    • Line 14: warning: exported type Append should have comment or be unexported (golint)
    • Line 15: warning: exported type Insert should have comment or be unexported (golint)
    • Line 16: warning: exported type Delete should have comment or be unexported (golint)
    • Line 17: warning: exported type Change should have comment or be unexported (golint)
    • Line 18: warning: exported type ReadFile should have comment or be unexported (golint)
    • Line 19: warning: exported type WriteFile should have comment or be unexported (golint)
    • Line 20: warning: exported type Pipe should have comment or be unexported (golint)
    • Line 21: warning: exported type Trade should have comment or be unexported (golint)
    • Line 22: warning: exported type S should have comment or be unexported (golint)
    • Line 30: warning: exported method Append.Apply should have comment or be unexported (golint)
    • Line 34: warning: exported method Insert.Apply should have comment or be unexported (golint)
    • Line 39: warning: exported method Delete.Apply should have comment or be unexported (golint)
    • Line 43: warning: exported method Change.Apply should have comment or be unexported (golint)
    • Line 60: warning: exported method ReadFile.Apply should have comment or be unexported (golint)
    • Line 73: warning: exported method WriteFile.Apply should have comment or be unexported (golint)
    • Line 87: warning: exported method Pipe.Apply should have comment or be unexported (golint)
    • Line 108: warning: exported method S.Apply should have comment or be unexported (golint)
    • edit/compile.go
    • Line 14: warning: exported var ErrNilFunc should have comment or be unexported (golint)
    • Line 22: warning: exported type Options should have comment or be unexported (golint)
    • Line 27: warning: exported type Command should have comment or be unexported (golint)
    • Line 36: warning: exported function MustCompile should have comment or be unexported (golint)
    • Line 143: warning: comment on exported method Command.RunTransaction should be of the form "RunTransaction ..." (golint)
    • edit/lex.go
    • Line 36: warning: exported type Kind should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign81%

IneffAssign detects ineffectual assignments in Go code.

    • edit/parse.go
    • Line 125: warning: ineffectual assignment to rel (ineffassign)
    • Line 365: warning: ineffectual assignment to x0 (ineffassign)
    • Line 366: warning: ineffectual assignment to y0 (ineffassign)
    • Line 366: warning: ineffectual assignment to y1 (ineffassign)

misspell81%

Misspell Finds commonly misspelled English words

    • edit/edit_test.go
    • Line 137: warning: "teh" is a misspelling of "the" (misspell)
    • Line 137: warning: "teh" is a misspelling of "the" (misspell)
    • Line 153: warning: "teh" is a misspelling of "the" (misspell)
    • Line 153: warning: "teh" is a misspelling of "the" (misspell)
    • Line 153: warning: "teh" is a misspelling of "the" (misspell)
    • Line 153: warning: "teh" is a misspelling of "the" (misspell)