Preparing report...

Report for github.com/golang/go

(v0.0.0-20240726201536-9e40780a4633)

A+    Excellent!    Found 692 issues across 3209 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!


gofmt78%

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

    • test/char_lit1.go
    • Line 16: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • Line 18: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • Line 19: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • Line 20: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • Line 23: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • Line 25: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • Line 26: escape sequence is invalid Unicode code point:1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/semi5.go
    • Line 10: unexpected semicolon or newline before {:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/semi2.go
    • Line 10: expected '{', found newline:1::warning: file is not gofmted with -s (gofmt)
    • Line 11: expected '}', found '{':1::warning: file is not gofmted with -s (gofmt)
    • Line 12: expected ';', found z:1::warning: file is not gofmted with -s (gofmt)
    • Line 14: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue9036.go
    • Line 21: 'p' exponent requires hexadecimal mantissa:1::warning: file is not gofmted with -s (gofmt)
    • Line 22: 'P' exponent requires hexadecimal mantissa:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue13319.go
    • Line 12: missing ',' before newline in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: expected operand, found 'case':1::warning: file is not gofmted with -s (gofmt)
    • Line 18: missing ',' in argument list:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug121.go
    • Line 12: expected ';', found ',':1::warning: file is not gofmted with -s (gofmt)
    • Line 16: expected ';', found T:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue23664.go
    • Line 12: expected ';', found true:1::warning: file is not gofmted with -s (gofmt)
    • Line 15: expected '{', found true:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: expected declaration, found '}':1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/chan.go
    • Line 11: expected type, found '}':1::warning: file is not gofmted with -s (gofmt)
    • Line 13: expected type, found ')':1::warning: file is not gofmted with -s (gofmt)
    • Line 16: expected type, found ',':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue22581.go
    • Line 10: expected ';', found ')':1::warning: file is not gofmted with -s (gofmt)
    • Line 13: expected '{', found 'if':1::warning: file is not gofmted with -s (gofmt)
    • Line 16: expected '{', found ')':1::warning: file is not gofmted with -s (gofmt)
    • Line 19: expected '{', found ']':1::warning: file is not gofmted with -s (gofmt)
    • Line 22: expected boolean or range expression, found assignment (missing parentheses around composite literal?):1::warning: file is not gofmted with -s (gofmt)
    • Line 22: expected '{', found ')':1::warning: file is not gofmted with -s (gofmt)
    • Line 25: expected '{', found ']':1::warning: file is not gofmted with -s (gofmt)
    • Line 27: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • Line 27: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue32133.go
    • Line 10: string literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • Line 11: rune literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • Line 12: string literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: raw string literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • Line 20: hexadecimal literal has no digits:1::warning: file is not gofmted with -s (gofmt)
    • Line 24: hexadecimal mantissa requires a 'p' exponent:1::warning: file is not gofmted with -s (gofmt)
    • Line 28: '_' must separate successive digits:1::warning: file is not gofmted with -s (gofmt)
    • test/typeparam/issue50317.go
    • Line 11: method must have no type parameters:1::warning: file is not gofmted with -s (gofmt)
    • Line 14: interface method must have no type parameters:1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/semi1.go
    • Line 10: expected '{', found newline:1::warning: file is not gofmted with -s (gofmt)
    • Line 14: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/if.go
    • Line 13: missing condition in if statement:1::warning: file is not gofmted with -s (gofmt)
    • Line 16: missing condition in if statement:1::warning: file is not gofmted with -s (gofmt)
    • test/bombad.go
    • Line 14: illegal byte order mark:1::warning: file is not gofmted with -s (gofmt)
    • Line 15: illegal byte order mark:1::warning: file is not gofmted with -s (gofmt)
    • Line 16: illegal byte order mark:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: illegal byte order mark:1::warning: file is not gofmted with -s (gofmt)
    • Line 18: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue4405.go
    • Line 11: illegal character U+0007:1::warning: file is not gofmted with -s (gofmt)
    • Line 12: illegal character U+0008:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: illegal character U+000B:1::warning: file is not gofmted with -s (gofmt)
    • Line 14: illegal character U+000C:1::warning: file is not gofmted with -s (gofmt)
    • Line 15: expected ')', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/import5.go
    • Line 24: import path must be a string:1::warning: file is not gofmted with -s (gofmt)
    • Line 25: import path must be a string:1::warning: file is not gofmted with -s (gofmt)
    • Line 26: import path must be a string:1::warning: file is not gofmted with -s (gofmt)
    • Line 27: import path must be a string:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug169.go
    • Line 8: illegal rune literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 8: rune literal not terminated:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug300.go
    • Line 23: cannot parenthesize type in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 24: cannot parenthesize type in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 25: cannot parenthesize type in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 26: cannot parenthesize type in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 27: cannot parenthesize type in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 28: cannot parenthesize type in composite literal:1::warning: file is not gofmted with -s (gofmt)
    • test/slice3err.go
    • Line 20: middle index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 21: middle index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 22: final index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 23: final index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 24: middle index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 25: middle index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 33: middle index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 34: middle index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 35: final index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 36: final index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • Line 37: middle index required in 3-index slice:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue13273.go
    • Line 50: expected 'chan', found '<-':1::warning: file is not gofmted with -s (gofmt)
    • Line 51: expected 'chan':1::warning: file is not gofmted with -s (gofmt)
    • Line 53: expected 'chan', found int:1::warning: file is not gofmted with -s (gofmt)
    • Line 54: expected channel type:1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/semi3.go
    • Line 10: expected '{', found newline:1::warning: file is not gofmted with -s (gofmt)
    • Line 14: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug228.go
    • Line 11: expected type, found ')':1::warning: file is not gofmted with -s (gofmt)
    • Line 13: expected type, found '...':1::warning: file is not gofmted with -s (gofmt)
    • Line 15: expected type, found '...':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue14006.go
    • Line 24: illegal label declaration:1::warning: file is not gofmted with -s (gofmt)
    • Line 25: expected ';', found 'case':1::warning: file is not gofmted with -s (gofmt)
    • Line 30: illegal label declaration:1::warning: file is not gofmted with -s (gofmt)
    • Line 37: illegal label declaration:1::warning: file is not gofmted with -s (gofmt)
    • Line 38: expected ';', found 'case':1::warning: file is not gofmted with -s (gofmt)
    • Line 43: illegal label declaration:1::warning: file is not gofmted with -s (gofmt)
    • Line 51: expected statement, found 'case':1::warning: file is not gofmted with -s (gofmt)
    • Line 67: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue18747.go
    • Line 10: missing condition in if statement:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: missing condition in if statement:1::warning: file is not gofmted with -s (gofmt)
    • Line 15: missing condition in if statement:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: missing condition in if statement:1::warning: file is not gofmted with -s (gofmt)
    • Line 19: missing condition in if statement:1::warning: file is not gofmted with -s (gofmt)
    • Line 26: unexpected newline, expecting { after if clause:1::warning: file is not gofmted with -s (gofmt)
    • test/switch2.go
    • Line 14: expected ':', found ';':1::warning: file is not gofmted with -s (gofmt)
    • Line 18: expected ':', found ';':1::warning: file is not gofmted with -s (gofmt)
    • Line 28: expected ';', found 'case':1::warning: file is not gofmted with -s (gofmt)
    • Line 33: expected ';', found 'default':1::warning: file is not gofmted with -s (gofmt)
    • Line 37: expected '}', found 'if':1::warning: file is not gofmted with -s (gofmt)
    • Line 39: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue50372.go
    • Line 16: expected at most 2 expressions:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: expected at most 2 expressions:1::warning: file is not gofmted with -s (gofmt)
    • Line 27: expected at most 2 expressions:1::warning: file is not gofmted with -s (gofmt)
    • Line 28: expected at most 2 expressions:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug349.go
    • Line 12: expected ';', found 2.01:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug388.go
    • Line 12: mixed named and unnamed parameters:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: expected type, found '.':1::warning: file is not gofmted with -s (gofmt)
    • Line 22: expected type, found '.':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue23586.go
    • Line 21: expression in defer must be function call:1::warning: file is not gofmted with -s (gofmt)
    • Line 22: expression in go must be function call:1::warning: file is not gofmted with -s (gofmt)
    • Line 23: expression in go must be function call:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug299.go
    • Line 16: cannot parenthesize embedded type:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: cannot parenthesize embedded type:1::warning: file is not gofmted with -s (gofmt)
    • Line 18: cannot parenthesize embedded type:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/bug014.go
    • Line 10: illegal character U+0027 ''' in escape sequence:1::warning: file is not gofmted with -s (gofmt)
    • Line 11: illegal character U+0027 ''' in escape sequence:1::warning: file is not gofmted with -s (gofmt)
    • Line 12: illegal character U+0027 ''' in escape sequence:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: illegal character U+0027 ''' in escape sequence:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue30722.go
    • Line 12: '_' must separate successive digits:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: binary literal has no digits:1::warning: file is not gofmted with -s (gofmt)
    • Line 14: octal literal has no digits:1::warning: file is not gofmted with -s (gofmt)
    • Line 15: hexadecimal literal has no digits:1::warning: file is not gofmted with -s (gofmt)
    • Line 16: '_' must separate successive digits:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue15611.go
    • Line 11: 1::warning: file is not gofmted with -s (gofmt)
    • Line 12: 1::warning: file is not gofmted with -s (gofmt)
    • Line 15: illegal rune literal:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: illegal rune literal:1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/semi4.go
    • Line 11: expected operand, found '{':1::warning: file is not gofmted with -s (gofmt)
    • Line 12: expected ';', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue4468.go
    • Line 22: expression in go must be function call:1::warning: file is not gofmted with -s (gofmt)
    • Line 23: expression in defer must be function call:1::warning: file is not gofmted with -s (gofmt)
    • Line 24: expression in go must not be parenthesized:1::warning: file is not gofmted with -s (gofmt)
    • Line 25: expression in defer must not be parenthesized:1::warning: file is not gofmted with -s (gofmt)
    • Line 26: expression in go must not be parenthesized:1::warning: file is not gofmted with -s (gofmt)
    • Line 27: expression in defer must not be parenthesized:1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue18915.go
    • Line 13: expected boolean expression, found assignment (missing parentheses around composite literal?):1::warning: file is not gofmted with -s (gofmt)
    • Line 16: expected boolean or range expression, found assignment (missing parentheses around composite literal?):1::warning: file is not gofmted with -s (gofmt)
    • Line 19: expected switch expression, found assignment (missing parentheses around composite literal?):1::warning: file is not gofmted with -s (gofmt)
    • test/func3.go
    • Line 16: mixed named and unnamed parameters:1::warning: file is not gofmted with -s (gofmt)
    • Line 17: mixed named and unnamed parameters:1::warning: file is not gofmted with -s (gofmt)
    • Line 18: mixed named and unnamed parameters:1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/semi6.go
    • Line 9: expected type, found newline:1::warning: file is not gofmted with -s (gofmt)
    • Line 11: expected type, found newline:1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/semi7.go
    • Line 11: expected statement, found 'else':1::warning: file is not gofmted with -s (gofmt)
    • Line 14: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue33386.go
    • Line 16: expected operand, found '}':1::warning: file is not gofmted with -s (gofmt)
    • Line 20: expected ';', found 'defer':1::warning: file is not gofmted with -s (gofmt)
    • Line 20: expression in go must be function call:1::warning: file is not gofmted with -s (gofmt)
    • Line 22: expected operand, found '}':1::warning: file is not gofmted with -s (gofmt)
    • Line 29: expected ';', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • Line 29: expected ';', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/fixedbugs/issue22164.go
    • Line 12: missing ',' before newline in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 13: missing ',' in argument list:1::warning: file is not gofmted with -s (gofmt)
    • Line 14: expected operand, found '}':1::warning: file is not gofmted with -s (gofmt)
    • Line 26: missing ',' in argument list:1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/initvar.go
    • Line 10: var declaration not allowed in if initializer:1::warning: file is not gofmted with -s (gofmt)
    • Line 12: expected operand, found 'var':1::warning: file is not gofmted with -s (gofmt)
    • Line 14: expected operand, found 'var':1::warning: file is not gofmted with -s (gofmt)
    • Line 15: expected '}', found 'EOF':1::warning: file is not gofmted with -s (gofmt)
    • test/syntax/chan1.go
    • Line 13: expected boolean expression, found simple statement (missing parentheses around composite literal?):1::warning: file is not gofmted with -s (gofmt)
    • Line 17: expected ';', found '<-':1::warning: file is not gofmted with -s (gofmt)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo100%

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.

No problems detected. Good job!


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!