Preparing report...

Report for github.com/pelletier/go-toml

(v1.9.5)

A    Great!    Found 16 issues across 42 files

Tweet

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!


gofmt73%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

    • doc.go
    • Line 1: warning: file is not gofmted with -s (gofmt)

gocyclo80%

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.

    • marshal_test.go
    • Line 2348: warning: cyclomatic complexity 21 of function TestUnmarshalDefault() is high (> 15) (gocyclo)
    • marshal.go
    • Line 980: warning: cyclomatic complexity 56 of function (*Decoder).valueFromToml() is high (> 15) (gocyclo)
    • Line 749: warning: cyclomatic complexity 44 of function (*Decoder).valueFromTree() is high (> 15) (gocyclo)
    • Line 429: warning: cyclomatic complexity 27 of function (*Encoder).valueToTree() is high (> 15) (gocyclo)
    • Line 533: warning: cyclomatic complexity 18 of function (*Encoder).valueToToml() is high (> 15) (gocyclo)
    • tomltree_write.go
    • Line 323: warning: cyclomatic complexity 37 of function (*Tree).writeToOrdered() is high (> 15) (gocyclo)
    • Line 129: warning: cyclomatic complexity 26 of function tomlValueStringRepresentation() is high (> 15) (gocyclo)
    • parser.go
    • Line 274: warning: cyclomatic complexity 36 of function (*tomlParser).parseRvalue() is high (> 15) (gocyclo)
    • lexer.go
    • Line 694: warning: cyclomatic complexity 35 of function (*tomlLexer).lexStringAsString() is high (> 15) (gocyclo)
    • Line 913: warning: cyclomatic complexity 33 of function (*tomlLexer).lexNumber() is high (> 15) (gocyclo)
    • Line 304: warning: cyclomatic complexity 25 of function (*tomlLexer).lexDateTime() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 25 of function (*tomlLexer).lexRvalue() is high (> 15) (gocyclo)
    • keysparsing.go
    • Line 13: warning: cyclomatic complexity 31 of function parseKey() is high (> 15) (gocyclo)
    • query/lexer.go
    • Line 219: warning: cyclomatic complexity 22 of function (*queryLexer).lexString() is high (> 15) (gocyclo)
    • Line 120: warning: cyclomatic complexity 21 of function (*queryLexer).lexVoid() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • tomltree_create_test.go
    • Line 130: warning: ineffectual assignment to err (ineffassign)
    • Line 150: warning: ineffectual assignment to err (ineffassign)
    • Line 170: warning: ineffectual assignment to err (ineffassign)
    • Line 193: warning: ineffectual assignment to err (ineffassign)

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!