Preparing report...

Report for github.com/smartystreets/assertions

A+    Excellent!    Found 31 issues across 51 files

Tweet

gofmt94%

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!


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.

    • assertions/internal/go-diff/diffmatchpatch/diff.go
    • Line 261: warning: cyclomatic complexity 34 of function (*DiffMatchPatch).diffBisect() is high (> 15) (gocyclo)
    • Line 999: warning: cyclomatic complexity 25 of function (*DiffMatchPatch).DiffCleanupMerge() is high (> 15) (gocyclo)
    • Line 888: warning: cyclomatic complexity 23 of function (*DiffMatchPatch).DiffCleanupEfficiency() is high (> 15) (gocyclo)
    • Line 773: warning: cyclomatic complexity 20 of function diffCleanupSemanticScore() is high (> 15) (gocyclo)
    • Line 647: warning: cyclomatic complexity 18 of function (*DiffMatchPatch).DiffCleanupSemantic() is high (> 15) (gocyclo)
    • assertions/internal/go-diff/diffmatchpatch/patch.go
    • Line 375: warning: cyclomatic complexity 19 of function (*DiffMatchPatch).PatchSplitMax() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 17 of function (*DiffMatchPatch).PatchApply() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 16 of function (*DiffMatchPatch).patchMake2() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • assertions/assert/assert.go
    • Line 58: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 63: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 68: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 79: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 85: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 93: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 101: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 109: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/assert/assert_passed_test.go
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 36: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 40: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 44: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/doc.go
    • Line 44: warning: exported type Assertion should have comment or be unexported (golint)
    • Line 56: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 92: 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)
    • assertions/equality.go
    • Line 79: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 94: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 320: warning: comment on exported function ShouldNotBeZeroValue should be of the form "ShouldNotBeZeroValue ..." (golint)
    • assertions/equality_test.go
    • Line 9: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 39: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 54: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 75: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 113: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 135: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 160: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 174: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 213: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 238: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 260: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 291: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 304: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 313: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 322: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 338: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/serializer.go
    • Line 11: warning: exported type Serializer should have comment or be unexported (golint)
    • Line 18: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 50: warning: comment on exported type FailureView should be of the form "FailureView ..." (with optional leading article) (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 68: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/should/should.go
    • Line 1: warning: package comment should be of the form "Package should ..." (golint)
    • Line 8: warning: exported var AlmostEqual should have comment or be unexported (golint)
    • assertions/internal/unit/fixture.go
    • Line 1: warning: package comment should be of the form "Package unit ..." (golint)
    • Line 16: warning: exported function Run should have comment or be unexported (golint)
    • Line 45: warning: exported type Fixture should have comment or be unexported (golint)
    • Line 55: warning: exported method Fixture.So should have comment or be unexported (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 64: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 71: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 80: warning: exported method Fixture.AssertEqual should have comment or be unexported (golint)
    • Line 80: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 83: warning: exported method Fixture.AssertSprintEqual should have comment or be unexported (golint)
    • Line 83: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 86: warning: exported method Fixture.AssertSprintfEqual should have comment or be unexported (golint)
    • Line 86: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 89: warning: exported method Fixture.AssertDeepEqual should have comment or be unexported (golint)
    • Line 89: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 96: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 97: warning: exported method Fixture.Errorf should have comment or be unexported (golint)
    • Line 97: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 99: warning: exported method Fixture.Print should have comment or be unexported (golint)
    • Line 99: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 100: warning: exported method Fixture.Printf should have comment or be unexported (golint)
    • Line 100: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 101: warning: exported method Fixture.Println should have comment or be unexported (golint)
    • Line 101: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 103: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 104: warning: exported method Fixture.Failed should have comment or be unexported (golint)
    • Line 104: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 105: warning: exported method Fixture.Name should have comment or be unexported (golint)
    • Line 105: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 107: warning: exported method Fixture.Finalize should have comment or be unexported (golint)
    • Line 107: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 116: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/collections.go
    • Line 229: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 238: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • assertions/quantity_test.go
    • Line 3: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 18: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 91: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 109: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 127: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/time_test.go
    • Line 8: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 34: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 91: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 106: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 121: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 136: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 145: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/doc_test.go
    • Line 72: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/equal_method.go
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 49: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 55: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 65: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/equal_method_test.go
    • Line 17: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 38: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 46: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 53: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 61: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 66: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 73: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 80: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 87: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 101: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 108: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 115: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 122: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 136: warning: don't use underscores in Go names; type Ineligible_NoEqualMethod should be IneligibleNoEqualMethod (golint)
    • Line 137: warning: don't use underscores in Go names; type Ineligible_EqualMethodNoInputs should be IneligibleEqualMethodNoInputs (golint)
    • Line 138: warning: don't use underscores in Go names; type Ineligible_EqualMethodNoOutputs should be IneligibleEqualMethodNoOutputs (golint)
    • Line 139: warning: don't use underscores in Go names; type Ineligible_EqualMethodTooManyInputs should be IneligibleEqualMethodTooManyInputs (golint)
    • Line 140: warning: don't use underscores in Go names; type Ineligible_EqualMethodTooManyOutputs should be IneligibleEqualMethodTooManyOutputs (golint)
    • Line 141: warning: don't use underscores in Go names; type Ineligible_EqualMethodWrongInput should be IneligibleEqualMethodWrongInput (golint)
    • Line 142: warning: don't use underscores in Go names; type Ineligible_EqualMethodWrongOutput should be IneligibleEqualMethodWrongOutput (golint)
    • Line 145: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 146: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 147: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 150: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 151: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 152: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 153: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 154: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 155: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/panic_test.go
    • Line 8: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 45: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/quantity.go
    • Line 41: warning: comment on exported function ShouldBeLessThanOrEqualTo should be of the form "ShouldBeLessThanOrEqualTo ..." (golint)
    • assertions/type_test.go
    • Line 11: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 22: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 56: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 77: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 93: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/utilities_for_test.go
    • Line 21: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 25: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 33: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 87: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/assert/assert_failed_test.go
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 26: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 32: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 42: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 52: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 57: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/collections_test.go
    • Line 8: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 20: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 30: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 44: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 59: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 74: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 89: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 115: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 140: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/strings.go
    • Line 89: warning: comment on exported function ShouldNotEndWith should be of the form "ShouldNotEndWith ..." (golint)
    • assertions/strings_test.go
    • Line 3: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 19: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 31: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 58: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 68: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 78: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 86: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 94: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 102: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • assertions/assert/logger.go
    • Line 37: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 48: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 60: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 70: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words

    • assertions/messages.go
    • Line 6: warning: "nto" is a misspelling of "not" (misspell)
    • Line 13: warning: "nto" is a misspelling of "not" (misspell)
    • Line 60: warning: "nto" is a misspelling of "not" (misspell)
    • Line 63: warning: "nto" is a misspelling of "not" (misspell)
    • Line 87: warning: "nto" is a misspelling of "not" (misspell)