package regressiontests

import (
	"reflect"
	"testing"
)

type Empty struct{}

func TestStructcheck(t *testing.T) {
	t.Parallel()
	source := `package test

type test struct {
	unused int
}
`
	pkgName := reflect.TypeOf(Empty{}).PkgPath()
	expected := Issues{
		{Linter: "structcheck", Severity: "warning", Path: "test.go", Line: 4, Col: 2, Message: "unused struct field " + pkgName + "/.test.unused"},
	}
	ExpectIssues(t, "structcheck", source, expected)
}

package regressiontests

import "testing"

func TestStructcheck(t *testing.T) {
	t.Parallel()
	source := `package test

type test struct {
	unused int
}
`
	expected := Issues{
		{Linter: "structcheck", Severity: "warning", Path: "test.go", Line: 4, Col: 2, Message: "unused struct field github.com/alecthomas/gometalinter/regressiontests/.test.unused"},
	}
	ExpectIssues(t, "structcheck", source, expected)
}

Revert "make tests compatible with forks"
Revert "make tests compatible with forks"

This reverts commit 27d000f852fa9c6c0c4a8e3c050710b1c83db186.
