1
0
mirror of https://github.com/securego/gosec.git synced 2024-12-28 21:08:22 +02:00

Fix go vet errors in tests

This commit is contained in:
Grant Murphy 2018-01-30 09:32:04 +10:00
parent b49fef79a5
commit 7c7fe752b6
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) {