mirror of
https://github.com/securego/gosec.git
synced 2025-03-01 12:43:28 +00:00
Edited README and help text.
This commit is contained in:
parent
2c1a0b8732
commit
1346bd37ca
3 changed files with 5 additions and 5 deletions
|
@ -104,7 +104,7 @@ $ gas -nosec=true ./...
|
||||||
|
|
||||||
### Output formats
|
### Output formats
|
||||||
|
|
||||||
Gas currently supports text, json and csv output formats. By default
|
Gas currently supports text, json, csv and JUnit XML output formats. By default
|
||||||
results will be reported to stdout, but can also be written to an output
|
results will be reported to stdout, but can also be written to an output
|
||||||
file. The output format is controlled by the '-fmt' flag, and the output file is controlled by the '-out' flag as follows:
|
file. The output format is controlled by the '-fmt' flag, and the output file is controlled by the '-out' flag as follows:
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ var (
|
||||||
flagIgnoreNoSec = flag.Bool("nosec", false, "Ignores #nosec comments when set")
|
flagIgnoreNoSec = flag.Bool("nosec", false, "Ignores #nosec comments when set")
|
||||||
|
|
||||||
// format output
|
// format output
|
||||||
flagFormat = flag.String("fmt", "text", "Set output format. Valid options are: json, csv, html, or text")
|
flagFormat = flag.String("fmt", "text", "Set output format. Valid options are: json, csv, junit-xml, html, or text")
|
||||||
|
|
||||||
// output file
|
// output file
|
||||||
flagOutput = flag.String("out", "", "Set output file for results")
|
flagOutput = flag.String("out", "", "Set output file for results")
|
||||||
|
|
|
@ -74,8 +74,8 @@ func CreateReport(w io.Writer, format string, issues []*gas.Issue, metrics *gas.
|
||||||
err = reportJSON(w, data)
|
err = reportJSON(w, data)
|
||||||
case "csv":
|
case "csv":
|
||||||
err = reportCSV(w, data)
|
err = reportCSV(w, data)
|
||||||
case "xml":
|
case "junit-xml":
|
||||||
err = reportXML(w, data)
|
err = reportJUnitXML(w, data)
|
||||||
case "html":
|
case "html":
|
||||||
err = reportFromHTMLTemplate(w, html, data)
|
err = reportFromHTMLTemplate(w, html, data)
|
||||||
case "text":
|
case "text":
|
||||||
|
@ -118,7 +118,7 @@ func reportCSV(w io.Writer, data *reportInfo) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func reportXML(w io.Writer, data *reportInfo) error {
|
func reportJUnitXML(w io.Writer, data *reportInfo) error {
|
||||||
groupedData := groupDataByRules(data)
|
groupedData := groupDataByRules(data)
|
||||||
junitXMLStruct := createJUnitXMLStruct(groupedData)
|
junitXMLStruct := createJUnitXMLStruct(groupedData)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue