Preparing report...

Report for github.com/r3labs/diff

A+    Excellent!    Found 7 issues across 24 files

Tweet

gofmt95%

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!


gocyclo91%

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.

    • diff/diff.go
    • Line 132: warning: cyclomatic complexity 21 of function (*Differ).diff() is high (> 15) (gocyclo)

golint79%

Golint is a linter for Go source code.

    • diff/change_value.go
    • Line 31: warning: comment on exported method ChangeValue.SetFlag should be of the form "SetFlag ..." (golint)
    • Line 145: warning: comment on exported method ChangeValue.NewElement should be of the form "NewElement ..." (golint)
    • diff/diff.go
    • Line 190: warning: exported method Changelog.Add should have comment or be unexported (golint)
    • Line 311: warning: exported function AreType should have comment or be unexported (golint)
    • diff/error.go
    • Line 14: warning: comment on exported type DiffError should be of the form "DiffError ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported method DiffError.WithCause should be of the form "WithCause ..." (golint)
    • diff/options.go
    • Line 3: warning: comment on exported function ConvertCompatibleTypes should be of the form "ConvertCompatibleTypes ..." (golint)
    • diff/patch.go
    • Line 42: warning: comment on exported type PatchFlags should be of the form "PatchFlags ..." (with optional leading article) (golint)
    • Line 47: warning: exported const OptionCreate should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported type PatchLog should have comment or be unexported (golint)
    • Line 110: warning: exported function Merge should have comment or be unexported (golint)
    • Line 121: 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 126: warning: exported function Patch should have comment or be unexported (golint)
    • Line 131: warning: comment on exported method Differ.Patch should be of the form "Patch ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.

    • diff/diff_examples_test.go
    • Line 91: warning: ineffectual assignment to patchLog (ineffassign)
    • Line 93: warning: ineffectual assignment to patchLog (ineffassign)
    • Line 95: warning: ineffectual assignment to patchLog (ineffassign)
    • Line 98: warning: ineffectual assignment to patchLog (ineffassign)
    • Line 195: warning: ineffectual assignment to cl (ineffassign)
    • Line 216: warning: ineffectual assignment to cl (ineffassign)
    • Line 473: warning: ineffectual assignment to patchLog (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!