1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-29 22:28:23 +02:00
Files
revive/testdata/exported_issue_1202.go
ccoVeille 8cb2599624 fix: invalid message reported for directive comment (#1209)
They were invalid but not reported with the correct message.

So they were wrongly caught by golangci-lint that excluded them by default.
2025-01-27 07:12:16 +01:00

28 lines
717 B
Go

package golint
import (
_ "embed"
)
var A []byte // MATCH /exported var A should have comment or be unexported/
var B string // MATCH /exported var B should have comment or be unexported/
//go:embed foo.txt
var C []byte // MATCH /exported var C should have comment or be unexported/
//go:generate pwd
var D string // MATCH /exported var D should have comment or be unexported/
func E() string { // MATCH /exported function E should have comment or be unexported/
return "E"
}
//nolint:gochecknoglobals
func F() string { // MATCH /exported function F should have comment or be unexported/
return "F"
}
//nolint:gochecknoglobals
const G = "G" // MATCH /exported const G should have comment or be unexported/