Merge pull request #136 from lanzafame/experimental

output/formatter: Issue.Line was already a string
This commit is contained in:
Grant Murphy 2017-10-05 00:02:19 +10:00 committed by GitHub
commit 27b2fd9cd3
3 changed files with 2 additions and 3 deletions

Binary file not shown.

View file

@ -40,7 +40,7 @@ var _ = Describe("Issue", func() {
issue := gas.NewIssue(ctx, target, "", gas.High, gas.High) issue := gas.NewIssue(ctx, target, "", gas.High, gas.High)
Expect(issue).ShouldNot(BeNil()) Expect(issue).ShouldNot(BeNil())
Expect(issue.Code).Should(MatchRegexp(`"bar"`)) Expect(issue.Code).Should(MatchRegexp(`"bar"`))
Expect(issue.Line).Should(Equal(2)) Expect(issue.Line).Should(Equal("2"))
}) })

View file

@ -19,7 +19,6 @@ import (
"encoding/json" "encoding/json"
htmlTemplate "html/template" htmlTemplate "html/template"
"io" "io"
"strconv"
plainTemplate "text/template" plainTemplate "text/template"
"github.com/GoASTScanner/gas" "github.com/GoASTScanner/gas"
@ -93,7 +92,7 @@ func reportCSV(w io.Writer, data *reportInfo) error {
for _, issue := range data.Issues { for _, issue := range data.Issues {
err := out.Write([]string{ err := out.Write([]string{
issue.File, issue.File,
strconv.Itoa(issue.Line), issue.Line,
issue.What, issue.What,
issue.Severity.String(), issue.Severity.String(),
issue.Confidence.String(), issue.Confidence.String(),