Preparing report...

Report for github.com/wlevene/ini

A    Great!    Found 11 issues across 13 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!


gocyclo92%

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.

    • ini/ini_tag.go
    • Line 25: warning: cyclomatic complexity 26 of function bindTag() is high (> 15) (gocyclo)

golint23%

Golint is a linter for Go source code.

    • ini/token/token.go
    • Line 5: warning: exported type TokenType should have comment or be unexported (golint)
    • Line 8: warning: don't use underscores in Go names; const TokenType_ILLEGAL should be TokenTypeILLEGAL (golint)
    • Line 8: warning: exported const TokenType_ILLEGAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: don't use underscores in Go names; const TokenType_EOF should be TokenTypeEOF (golint)
    • Line 12: warning: don't use underscores in Go names; const TokenType_SECTION should be TokenTypeSECTION (golint)
    • Line 13: warning: don't use underscores in Go names; const TokenType_KEY should be TokenTypeKEY (golint)
    • Line 14: warning: don't use underscores in Go names; const TokenType_VALUE should be TokenTypeVALUE (golint)
    • Line 15: warning: don't use underscores in Go names; const TokenType_COMMENT should be TokenTypeCOMMENT (golint)
    • Line 16: warning: don't use underscores in Go names; const TokenType_COMMENT2 should be TokenTypeCOMMENT2 (golint)
    • Line 18: warning: don't use underscores in Go names; const TokenType_ASSIGN should be TokenTypeASSIGN (golint)
    • Line 19: warning: don't use underscores in Go names; const TokenType_LBRACKET should be TokenTypeLBRACKET (golint)
    • Line 20: warning: don't use underscores in Go names; const TokenType_RBRACKET should be TokenTypeRBRACKET (golint)
    • Line 25: warning: exported type Token should have comment or be unexported (golint)
    • Line 35: warning: exported function LookupIdent should have comment or be unexported (golint)
    • ini/ast/ast_node.go
    • Line 9: warning: exported type SetcionNode should have comment or be unexported (golint)
    • Line 14: warning: exported var KindSetcion should have comment or be unexported (golint)
    • Line 21: warning: exported method SetcionNode.Type should have comment or be unexported (golint)
    • Line 25: warning: exported method SetcionNode.IsRaw should have comment or be unexported (golint)
    • Line 49: warning: exported type KVNode should have comment or be unexported (golint)
    • Line 57: warning: exported var KindKVNode should have comment or be unexported (golint)
    • Line 64: warning: exported method KVNode.Type should have comment or be unexported (golint)
    • Line 68: warning: exported method KVNode.IsRaw should have comment or be unexported (golint)
    • Line 72: warning: exported method KVNode.Text should have comment or be unexported (golint)
    • Line 88: warning: exported type CommentNode should have comment or be unexported (golint)
    • Line 93: warning: exported var KindCommentNode should have comment or be unexported (golint)
    • Line 100: warning: exported method CommentNode.Type should have comment or be unexported (golint)
    • Line 104: warning: exported method CommentNode.IsRaw should have comment or be unexported (golint)
    • Line 108: warning: exported method CommentNode.Text should have comment or be unexported (golint)
    • ini/ini.go
    • Line 22: warning: exported type Ini should have comment or be unexported (golint)
    • Line 35: warning: exported function New should have comment or be unexported (golint)
    • Line 43: warning: exported method Ini.Err should have comment or be unexported (golint)
    • Line 47: warning: exported method Ini.LoadFile should have comment or be unexported (golint)
    • Line 61: warning: exported method Ini.WatchFile should have comment or be unexported (golint)
    • Line 100: warning: exported method Ini.StopWatch should have comment or be unexported (golint)
    • Line 107: warning: exported method Ini.Load should have comment or be unexported (golint)
    • Line 121: warning: exported method Ini.Dump should have comment or be unexported (golint)
    • Line 130: warning: exported method Ini.Marshal2Map should have comment or be unexported (golint)
    • Line 130: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 143: warning: don't use underscores in Go names; var kv_node should be kvNode (golint)
    • Line 147: warning: don't use underscores in Go names; var sect_node should be sectNode (golint)
    • Line 165: warning: exported method Ini.Marshal2Json should have comment or be unexported (golint)
    • Line 165: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 179: warning: exported method Ini.Section should have comment or be unexported (golint)
    • Line 179: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 193: warning: exported method Ini.Get should have comment or be unexported (golint)
    • Line 193: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 197: warning: exported method Ini.GetDef should have comment or be unexported (golint)
    • Line 197: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 216: warning: exported method Ini.GetInt should have comment or be unexported (golint)
    • Line 216: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 221: warning: exported method Ini.GetIntDef should have comment or be unexported (golint)
    • Line 221: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 236: warning: exported method Ini.GetInt64 should have comment or be unexported (golint)
    • Line 236: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 241: warning: exported method Ini.GetInt64Def should have comment or be unexported (golint)
    • Line 241: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 256: warning: exported method Ini.GetFloat64 should have comment or be unexported (golint)
    • Line 256: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 261: warning: exported method Ini.GetFloat64Def should have comment or be unexported (golint)
    • Line 261: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 275: warning: exported method Ini.Set should have comment or be unexported (golint)
    • Line 275: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 286: warning: don't use underscores in Go names; var val_str should be valStr (golint)
    • Line 314: warning: exported method Ini.Del should have comment or be unexported (golint)
    • Line 314: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 328: warning: don't use underscores in Go names; var kv_node should be kvNode (golint)
    • Line 354: warning: exported method Ini.DelSection should have comment or be unexported (golint)
    • Line 354: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 368: warning: don't use underscores in Go names; var sect_node should be sectNode (golint)
    • Line 380: warning: comment on exported method Ini.Save should be of the form "Save ..." (golint)
    • Line 381: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 393: warning: don't use underscores in Go names; var is_last_type_comment should be isLastTypeComment (golint)
    • Line 395: warning: don't use underscores in Go names; var kv_node should be kvNode (golint)
    • Line 401: warning: don't use underscores in Go names; var sect_node should be sectNode (golint)
    • Line 411: warning: don't use underscores in Go names; var kv_node should be kvNode (golint)
    • Line 420: warning: don't use underscores in Go names; var comm_node should be commNode (golint)
    • Line 443: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 457: warning: don't use underscores in Go names; var sect_node should be sectNode (golint)
    • Line 475: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 486: warning: don't use underscores in Go names; var kv_node should be kvNode (golint)
    • Line 509: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 520: warning: don't use underscores in Go names; var last_kv_node should be lastKvNode (golint)
    • Line 522: warning: don't use underscores in Go names; var kv_node should be kvNode (golint)
    • Line 595: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 595: warning: don't use underscores in Go names; method re_adjust_node_line should be reAdjustNodeLine (golint)
    • ini/ini_test.go
    • Line 35: warning: don't use underscores in Go names; var i_doc should be iDoc (golint)
    • Line 148: warning: don't use underscores in Go names; var json_str should be jsonStr (golint)
    • ini/scanner/scanner.go
    • Line 10: warning: exported type Scanner should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • Line 24: warning: exported method Scanner.Scan should have comment or be unexported (golint)
    • Line 24: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • ini/lexer/lexer.go
    • Line 8: warning: exported const LineBreak should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: exported type Lexer should have comment or be unexported (golint)
    • Line 15: warning: don't use underscores in Go names; struct field read_position should be readPosition (golint)
    • Line 19: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 92: warning: exported method Lexer.NextToken should have comment or be unexported (golint)
    • ini/ast/ast.go
    • Line 9: warning: exported type NodeType should have comment or be unexported (golint)
    • Line 10: warning: exported type NodeKind should have comment or be unexported (golint)
    • Line 15: warning: comment on exported const TypeDocNode should be of the form "TypeDocNode ..." (golint)
    • Line 162: warning: exported type Attribute should have comment or be unexported (golint)
    • Line 184: warning: exported method BaseNode.Kind should have comment or be unexported (golint)
    • Line 188: warning: exported method BaseNode.Type should have comment or be unexported (golint)
    • Line 192: warning: exported method BaseNode.Depth should have comment or be unexported (golint)
    • Line 195: warning: don't use underscores in Go names; var i_node should be iNode (golint)
    • Line 217: warning: exported method BaseNode.IsLeaf should have comment or be unexported (golint)
    • Line 410: warning: exported method BaseNode.IsRaw should have comment or be unexported (golint)
    • Line 473: warning: exported method BaseNode.Dump should have comment or be unexported (golint)
    • ini/ast/doc.go
    • Line 5: warning: exported type Doc should have comment or be unexported (golint)
    • Line 12: warning: exported function NewDoc should have comment or be unexported (golint)
    • Line 21: warning: exported method Doc.DumpV2 should have comment or be unexported (golint)
    • Line 33: warning: exported var KindDocNode should have comment or be unexported (golint)
    • Line 36: warning: receiver name n should be consistent with previous receiver name doc for Doc (golint)
    • Line 40: warning: exported method Doc.Type should have comment or be unexported (golint)
    • Line 40: warning: receiver name n should be consistent with previous receiver name doc for Doc (golint)
    • Line 44: warning: exported method Doc.IsRaw should have comment or be unexported (golint)
    • Line 44: warning: receiver name n should be consistent with previous receiver name doc for Doc (golint)
    • Line 48: warning: exported method Doc.Text should have comment or be unexported (golint)
    • Line 48: warning: receiver name n should be consistent with previous receiver name doc for Doc (golint)
    • Line 53: warning: receiver name n should be consistent with previous receiver name doc for Doc (golint)
    • ini/ini_tag.go
    • Line 11: warning: exported function Unmarshal should have comment or be unexported (golint)
    • Line 60: warning: don't use underscores in Go names; var change_fun should be changeFun (golint)
    • Line 64: warning: don't use underscores in Go names; var str_v should be strV (golint)
    • ini/parser/parser.go
    • Line 14: warning: exported type Parser should have comment or be unexported (golint)
    • Line 24: warning: exported function New should have comment or be unexported (golint)
    • Line 39: warning: exported method Parser.ParseDocument should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign84%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!