1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
revive/testdata/import_dot.go
2024-11-11 19:31:18 +01:00

23 lines
663 B
Go

// Test that dot imports are flagged.
package fixtures
import (
. "context" // in allowedPackages (standard library => just the name without full path)
. "errors" // in allowedPackages (standard library => just the name without full path)
. "fmt" // MATCH /should not use dot imports/
"math/rand"
tmplt "text/template"
. "github.com/BurntSushi/toml" // in allowedPackages (not in the standard library)
)
var _ Stringer // from "fmt"
var _ = New("fake error")
var _ = Background()
var _ = Position{} // check a package not in the standard library
var _ = rand.Rand{} // check non-alias package
var _ = tmplt.Template{} // check alias package