mirror of
https://github.com/securego/gosec.git
synced 2025-03-01 04:33:29 +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
|
||||
|
||||
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
|
||||
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")
|
||||
|
||||
// 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
|
||||
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)
|
||||
case "csv":
|
||||
err = reportCSV(w, data)
|
||||
case "xml":
|
||||
err = reportXML(w, data)
|
||||
case "junit-xml":
|
||||
err = reportJUnitXML(w, data)
|
||||
case "html":
|
||||
err = reportFromHTMLTemplate(w, html, data)
|
||||
case "text":
|
||||
|
@ -118,7 +118,7 @@ func reportCSV(w io.Writer, data *reportInfo) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func reportXML(w io.Writer, data *reportInfo) error {
|
||||
func reportJUnitXML(w io.Writer, data *reportInfo) error {
|
||||
groupedData := groupDataByRules(data)
|
||||
junitXMLStruct := createJUnitXMLStruct(groupedData)
|
||||
|
||||
|
|
Loading…
Reference in a new issue