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 {
224
224
225
225
// AppendError appends an error to the file errors
226
226
func (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)
228
228
r := regexp .MustCompile (`no buildable Go source files in` )
229
229
if r .MatchString (err .Error ()) {
230
230
return
Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ var _ = Describe("Analyzer", func() {
231
231
pkg := testutils .NewTestPackage ()
232
232
defer pkg .Close ()
233
233
pkg .AddFile ("foo_test.go" , `
234
- package tests
234
+ package tests
235
235
import "testing"
236
236
func TestFoo(t *testing.T){
237
237
}` )
@@ -271,14 +271,14 @@ var _ = Describe("Analyzer", func() {
271
271
pkg := testutils .NewTestPackage ()
272
272
defer pkg .Close ()
273
273
pkg .AddFile ("foo.go" , `
274
- package foo
275
- func foo(){
276
- }` )
274
+ package foo
275
+ func foo(){
276
+ }` )
277
277
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
+ }` )
282
282
err := pkg .Build ()
283
283
Expect (err ).ShouldNot (HaveOccurred ())
284
284
err = customAnalyzer .Process (buildTags , pkg .Path )
You can’t perform that action at this time.
0 commit comments