File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ func (gosec *Analyzer) ParseErrors(pkg *packages.Package) error {
224224
225225// AppendError appends an error to the file errors
226226func (gosec * Analyzer ) AppendError (file string , err error ) {
227- // Do not report the error for empty packages (e.g. files excluded from build with a tag
227+ // Do not report the error for empty packages (e.g. files excluded from build with a tag)
228228 r := regexp .MustCompile (`no buildable Go source files in` )
229229 if r .MatchString (err .Error ()) {
230230 return
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ var _ = Describe("Analyzer", func() {
231231 pkg := testutils .NewTestPackage ()
232232 defer pkg .Close ()
233233 pkg .AddFile ("foo_test.go" , `
234- package tests
234+ package tests
235235 import "testing"
236236 func TestFoo(t *testing.T){
237237 }` )
@@ -271,14 +271,14 @@ var _ = Describe("Analyzer", func() {
271271 pkg := testutils .NewTestPackage ()
272272 defer pkg .Close ()
273273 pkg .AddFile ("foo.go" , `
274- package foo
275- func foo(){
276- }` )
274+ package foo
275+ func foo(){
276+ }` )
277277 pkg .AddFile ("foo_test.go" , `
278- package foo_test
279- import "testing"
280- func TestFoo(t *testing.T){
281- }` )
278+ package foo_test
279+ import "testing"
280+ func TestFoo(t *testing.T){
281+ }` )
282282 err := pkg .Build ()
283283 Expect (err ).ShouldNot (HaveOccurred ())
284284 err = customAnalyzer .Process (buildTags , pkg .Path )
You can’t perform that action at this time.
0 commit comments