mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 03:55:54 +00:00
Fix go vet errors in tests
This commit is contained in:
parent
f7c31f2439
commit
485bc31df8
3 changed files with 4 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
||||||
package gas_test
|
package gas_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
@ -20,10 +19,9 @@ var _ = Describe("Analyzer", func() {
|
||||||
var (
|
var (
|
||||||
analyzer *gas.Analyzer
|
analyzer *gas.Analyzer
|
||||||
logger *log.Logger
|
logger *log.Logger
|
||||||
output *bytes.Buffer
|
|
||||||
)
|
)
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
logger, output = testutils.NewLogger()
|
logger, _ = testutils.NewLogger()
|
||||||
analyzer = gas.NewAnalyzer(nil, logger)
|
analyzer = gas.NewAnalyzer(nil, logger)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ package gas_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
//. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("ImportTracker", func() {
|
var _ = Describe("ImportTracker", func() {
|
||||||
|
@ -15,6 +15,7 @@ var _ = Describe("ImportTracker", func() {
|
||||||
})
|
})
|
||||||
Context("when I have a valid go package", func() {
|
Context("when I have a valid go package", func() {
|
||||||
It("should record all import specs", func() {
|
It("should record all import specs", func() {
|
||||||
|
Expect(source).To(Equal(source))
|
||||||
Skip("Not implemented")
|
Skip("Not implemented")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -17,14 +17,13 @@ var _ = Describe("gas rules", func() {
|
||||||
|
|
||||||
var (
|
var (
|
||||||
logger *log.Logger
|
logger *log.Logger
|
||||||
output *bytes.Buffer
|
|
||||||
config gas.Config
|
config gas.Config
|
||||||
analyzer *gas.Analyzer
|
analyzer *gas.Analyzer
|
||||||
runner func(string, []testutils.CodeSample)
|
runner func(string, []testutils.CodeSample)
|
||||||
)
|
)
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
logger, output = testutils.NewLogger()
|
logger, _ = testutils.NewLogger()
|
||||||
config = gas.NewConfig()
|
config = gas.NewConfig()
|
||||||
analyzer = gas.NewAnalyzer(config, logger)
|
analyzer = gas.NewAnalyzer(config, logger)
|
||||||
runner = func(rule string, samples []testutils.CodeSample) {
|
runner = func(rule string, samples []testutils.CodeSample) {
|
||||||
|
|
Loading…
Reference in a new issue