From b68ac76dbcc70f35e0f9bbf5b2fee10d19325d84 Mon Sep 17 00:00:00 2001 From: Cosmin Cojocar Date: Tue, 30 Apr 2019 17:14:26 +0200 Subject: [PATCH] Fix formatting Signed-off-by: Cosmin Cojocar --- analyzer.go | 2 +- analyzer_test.go | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/analyzer.go b/analyzer.go index 45e3483..1d3dd57 100644 --- a/analyzer.go +++ b/analyzer.go @@ -224,7 +224,7 @@ func (gosec *Analyzer) ParseErrors(pkg *packages.Package) error { // AppendError appends an error to the file errors func (gosec *Analyzer) AppendError(file string, err error) { - // Do not report the error for empty packages (e.g. files excluded from build with a tag + // Do not report the error for empty packages (e.g. files excluded from build with a tag) r := regexp.MustCompile(`no buildable Go source files in`) if r.MatchString(err.Error()) { return diff --git a/analyzer_test.go b/analyzer_test.go index a70ef25..80233a8 100644 --- a/analyzer_test.go +++ b/analyzer_test.go @@ -231,7 +231,7 @@ var _ = Describe("Analyzer", func() { pkg := testutils.NewTestPackage() defer pkg.Close() pkg.AddFile("foo_test.go", ` - package tests + package tests import "testing" func TestFoo(t *testing.T){ }`) @@ -271,14 +271,14 @@ var _ = Describe("Analyzer", func() { pkg := testutils.NewTestPackage() defer pkg.Close() pkg.AddFile("foo.go", ` - package foo - func foo(){ - }`) + package foo + func foo(){ + }`) pkg.AddFile("foo_test.go", ` - package foo_test - import "testing" - func TestFoo(t *testing.T){ - }`) + package foo_test + import "testing" + func TestFoo(t *testing.T){ + }`) err := pkg.Build() Expect(err).ShouldNot(HaveOccurred()) err = customAnalyzer.Process(buildTags, pkg.Path)