whatcanGOwrong
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
exec gofumpt -w foo.go
|
||||
cmp foo.go foo.go.golden
|
||||
|
||||
exec gofumpt -d foo.go.golden
|
||||
! stdout .
|
||||
|
||||
-- foo.go --
|
||||
//go:build tag
|
||||
// +build tag
|
||||
|
||||
package p
|
||||
|
||||
//go:generate some command
|
||||
|
||||
//go:unknowndirective
|
||||
|
||||
//lint:disablefoo
|
||||
|
||||
//go-sumtype:decl Foo
|
||||
|
||||
//nolint
|
||||
|
||||
//nolint // explanation
|
||||
|
||||
//nolint:somelinter // explanation
|
||||
|
||||
//NOSONAR
|
||||
|
||||
//NOSONAR // explanation
|
||||
|
||||
//noinspection ALL
|
||||
|
||||
//noinspection foo,bar
|
||||
|
||||
//not actually: a directive
|
||||
|
||||
//https://just.one/url
|
||||
|
||||
//TODO: do something
|
||||
|
||||
//export CgoFunc
|
||||
|
||||
//extern open
|
||||
func c_open(name *byte, mode int, perm int) int
|
||||
|
||||
//line 123
|
||||
|
||||
//sys Unlink(path string) (err error)
|
||||
|
||||
//sysnb Getpid() (pid int)
|
||||
|
||||
//foo is foo.
|
||||
type foo int
|
||||
|
||||
// comment with a tab.
|
||||
|
||||
// comment with many spaces
|
||||
|
||||
//comment group
|
||||
//123 numbers too
|
||||
|
||||
// comment group
|
||||
//123 numbers too
|
||||
|
||||
//{
|
||||
//this is probably code
|
||||
//}
|
||||
|
||||
////////////
|
||||
// ascii art
|
||||
//----------
|
||||
|
||||
//
|
||||
-- foo.go.golden --
|
||||
//go:build tag
|
||||
// +build tag
|
||||
|
||||
package p
|
||||
|
||||
//go:generate some command
|
||||
|
||||
//go:unknowndirective
|
||||
|
||||
//lint:disablefoo
|
||||
|
||||
//go-sumtype:decl Foo
|
||||
|
||||
//nolint
|
||||
|
||||
//nolint // explanation
|
||||
|
||||
//nolint:somelinter // explanation
|
||||
|
||||
//NOSONAR
|
||||
|
||||
//NOSONAR // explanation
|
||||
|
||||
//noinspection ALL
|
||||
|
||||
//noinspection foo,bar
|
||||
|
||||
// not actually: a directive
|
||||
|
||||
// https://just.one/url
|
||||
|
||||
// TODO: do something
|
||||
|
||||
//export CgoFunc
|
||||
|
||||
//extern open
|
||||
func c_open(name *byte, mode int, perm int) int
|
||||
|
||||
//line 123
|
||||
|
||||
//sys Unlink(path string) (err error)
|
||||
|
||||
//sysnb Getpid() (pid int)
|
||||
|
||||
// foo is foo.
|
||||
type foo int
|
||||
|
||||
// comment with a tab.
|
||||
|
||||
// comment with many spaces
|
||||
|
||||
// comment group
|
||||
// 123 numbers too
|
||||
|
||||
// comment group
|
||||
// 123 numbers too
|
||||
|
||||
//{
|
||||
//this is probably code
|
||||
//}
|
||||
|
||||
////////////
|
||||
// ascii art
|
||||
//----------
|
||||
|
||||
//
|
||||
Reference in New Issue
Block a user