mirror of
https://github.com/securego/gosec.git
synced 2024-12-25 12:05:52 +00:00
Merge pull request #136 from lanzafame/experimental
output/formatter: Issue.Line was already a string
This commit is contained in:
commit
27b2fd9cd3
3 changed files with 2 additions and 3 deletions
BIN
cmd/gas/gas
BIN
cmd/gas/gas
Binary file not shown.
|
@ -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"))
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
Loading…
Reference in a new issue