Preparing report...

Report for github.com/SimonWaldherr/golang-examples

(v1.14.0)

A+    Excellent!    Found 29 issues across 147 files

Tweet

gofmt99%

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!


golint84%

Golint is a linter for Go source code.

    • beginner/isbn.go
    • Line 19: warning: exported function VerifyISBN should have comment or be unexported (golint)
    • Line 29: warning: exported function VerifyISBN10 should have comment or be unexported (golint)
    • Line 55: warning: exported function VerifyISBN13 should have comment or be unexported (golint)
    • expert/pi2go-live.go
    • Line 17: warning: exported const NULL should have comment (or a comment on this block) or be unexported (golint)
    • expert/label.go
    • Line 7: warning: exported function BreakExample should have comment or be unexported (golint)
    • Line 18: warning: exported function ContinueExample should have comment or be unexported (golint)
    • Line 29: warning: exported function ContinueToLabelExample should have comment or be unexported (golint)
    • Line 46: warning: exported function GotoExample should have comment or be unexported (golint)
    • Line 60: warning: exported function GotoExample2 should have comment or be unexported (golint)
    • advanced/packages/lorem.go
    • Line 7: warning: exported type Reader should have comment or be unexported (golint)
    • Line 12: warning: exported function NewReader should have comment or be unexported (golint)
    • beginner/math.go
    • Line 7: warning: exported function Abs should have comment or be unexported (golint)
    • Line 14: warning: exported function GreatestCommonDivisor should have comment or be unexported (golint)
    • Line 21: warning: exported function LeastCommonMultiple should have comment or be unexported (golint)
    • Line 25: warning: exported function Sqrt should have comment or be unexported (golint)
    • Line 45: warning: exported function Prime should have comment or be unexported (golint)
    • Line 70: warning: exported function Sum should have comment or be unexported (golint)
    • expert/httpsd.go
    • Line 53: warning: don't use underscores in Go names; var ca_b should be caB (golint)
    • Line 97: warning: don't use underscores in Go names; var ca_b should be caB (golint)
    • Line 99: warning: don't use underscores in Go names; var priv_b should be privB (golint)
    • advanced/packages/foobar.go
    • Line 7: warning: exported function PublicFunc should have comment or be unexported (golint)
    • Line 11: warning: exported function PlusOne should have comment or be unexported (golint)
    • non-std-lib/timeseries.go
    • Line 28: warning: exported function Union should have comment or be unexported (golint)
    • Line 42: warning: exported function Intersection should have comment or be unexported (golint)
    • beginner/hashing.go
    • Line 16: warning: don't use underscores in Go names; var sha_256 should be sha256 (golint)
    • Line 17: warning: don't use underscores in Go names; var sha_512 should be sha512 (golint)
    • Line 21: warning: don't use underscores in Go names; var sha_512_256 should be sha512_256 (golint)
    • expert/image2.go
    • Line 12: warning: exported type Circle should have comment or be unexported (golint)
    • Line 16: warning: exported method Circle.Brightness should have comment or be unexported (golint)
    • Line 21: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • expert/pi2go.go
    • Line 15: warning: exported const NULL should have comment (or a comment on this block) or be unexported (golint)
    • expert/ppk-crypto.go
    • Line 14: warning: don't use underscores in Go names; func result private_key_bytes should be privateKeyBytes (golint)
    • Line 14: warning: don't use underscores in Go names; func result public_key_bytes should be publicKeyBytes (golint)
    • Line 15: warning: don't use underscores in Go names; var private_key should be privateKey (golint)
    • Line 21: warning: don't use underscores in Go names; func parameter private_key_bytes should be privateKeyBytes (golint)
    • Line 23: warning: don't use underscores in Go names; var private_key should be privateKey (golint)
    • Line 35: warning: don't use underscores in Go names; func parameter public_key_bytes should be publicKeyBytes (golint)
    • Line 36: warning: don't use underscores in Go names; var public_key should be publicKey (golint)
    • Line 41: warning: don't use underscores in Go names; var public_key should be publicKey (golint)
    • Line 57: warning: don't use underscores in Go names; var private_key should be privateKey (golint)
    • Line 57: warning: don't use underscores in Go names; var public_key should be publicKey (golint)
    • expert/stringdistance.go
    • Line 21: warning: exported function LevenshteinDistance should have comment or be unexported (golint)
    • Line 46: warning: exported function DamerauLevenshteinDistance should have comment or be unexported (golint)

gocyclo99%

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.


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

    • advanced/packages/lorem.go
    • Line 15: warning: "philosophiae" is a misspelling of "philosophies" (misspell)
    • Line 15: warning: "philosophia" is a misspelling of "philosophical" (misspell)
    • Line 15: warning: "philosophia" is a misspelling of "philosophical" (misspell)
    • Line 15: warning: "constituant" is a misspelling of "constituent" (misspell)
    • advanced/fanin.go
    • Line 15: warning: "untill" is a misspelling of "until" (misspell)
    • Line 25: warning: "mulitple" is a misspelling of "multiple" (misspell)
    • Line 43: warning: "differnt" is a misspelling of "different" (misspell)