Skip to content

Commit

Permalink
drop support to -force flag
Browse files Browse the repository at this point in the history
Drop support to -force flag, so now, the report will not have the
timestamp on name. This will make life more easily.
  • Loading branch information
mattheusv committed Jan 26, 2021
1 parent bd30560 commit 20af38a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ results/


# Report files
report-*.html
report-*.json
report.html
report.json
*.css
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ insider is the CLI project from the Insider Application Security Team for the co
Usage:
-exclude value
Patterns to exclude directory or files to analyze. Can be used multiple times
-force
Overwrite the report file name. Insider does not overwrite the results directory by default (default false)
-jobs int
Number of analysis to execute in parallel (default 4)
-no-html
Expand Down
2 changes: 0 additions & 2 deletions README_pt-br.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ insider is the CLI project from the Insider Application Security Team for the co
Usage:
-exclude value
Patterns to exclude directory or files to analyze. Can be used multiple times
-force
Overwrite the report file name. Insider does not overwrite the results directory by default (default false)
-jobs int
Number of analysis to execute in parallel (default 4)
-no-html
Expand Down
15 changes: 2 additions & 13 deletions cmd/insider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ var (

flagJobs = flag.Int("jobs", 4, "Number of analysis to execute in parallel")

flagForce = flag.Bool("force", false, "Overwrite the report file name. Insider does not overwrite the results directory by default (default false)")
flagNoHTML = flag.Bool("no-html", false, "Skips the report generation in the HTML format")
flagNoJSON = flag.Bool("no-json", false, "Skips the report generation in the JSON format")
flagQuiet = flag.Bool("quiet", false, "No output logs of execution")
Expand Down Expand Up @@ -141,12 +140,7 @@ func main() {
}

if !*flagNoJSON {
name := "report.json"
if !*flagForce {
currentTime := time.Now()
name = fmt.Sprintf("report-%v.json", currentTime.Format("20060102150405"))
}
out, err := os.Create(name)
out, err := os.Create("report.json")
if err != nil {
fmt.Fprintf(os.Stderr, "Error to create json report: %v\n", err)
os.Exit(1)
Expand All @@ -159,12 +153,7 @@ func main() {
}

if !*flagNoHTML {
name := "report.html"
if !*flagForce {
currentTime := time.Now()
name = fmt.Sprintf("report-%v.html", currentTime.Format("20060102150405"))
}
out, err := os.Create(name)
out, err := os.Create("report.html")
if err != nil {
fmt.Fprintf(os.Stderr, "Error to create html report: %v\n", err)
os.Exit(1)
Expand Down

0 comments on commit 20af38a

Please sign in to comment.