Fix go vet errors in tests

This commit is contained in:
Grant Murphy 2018-01-30 09:32:04 +10:00 committed by Jon McClintock
parent f7c31f2439
commit 485bc31df8
3 changed files with 4 additions and 6 deletions

View file

@ -1,7 +1,6 @@
package gas_test
import (
"bytes"
"io/ioutil"
"log"
"os"
@ -20,10 +19,9 @@ var _ = Describe("Analyzer", func() {
var (
analyzer *gas.Analyzer
logger *log.Logger
output *bytes.Buffer
)
BeforeEach(func() {
logger, output = testutils.NewLogger()
logger, _ = testutils.NewLogger()
analyzer = gas.NewAnalyzer(nil, logger)
})

View file

@ -2,7 +2,7 @@ package gas_test
import (
. "github.com/onsi/ginkgo"
//. "github.com/onsi/gomega"
. "github.com/onsi/gomega"
)
var _ = Describe("ImportTracker", func() {
@ -15,6 +15,7 @@ var _ = Describe("ImportTracker", func() {
})
Context("when I have a valid go package", func() {
It("should record all import specs", func() {
Expect(source).To(Equal(source))
Skip("Not implemented")
})

View file

@ -17,14 +17,13 @@ var _ = Describe("gas rules", func() {
var (
logger *log.Logger
output *bytes.Buffer
config gas.Config
analyzer *gas.Analyzer
runner func(string, []testutils.CodeSample)
)
BeforeEach(func() {
logger, output = testutils.NewLogger()
logger, _ = testutils.NewLogger()
config = gas.NewConfig()
analyzer = gas.NewAnalyzer(config, logger)
runner = func(rule string, samples []testutils.CodeSample) {