From c6e25a9b646f5982c2969653b250d97fcf50cba3 Mon Sep 17 00:00:00 2001 From: Cedric Staub Date: Mon, 25 Jul 2016 16:07:20 -0700 Subject: [PATCH] Make sure -fmt json produces valid output --- output/formatter.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/output/formatter.go b/output/formatter.go index 0de65ee..8211f5e 100644 --- a/output/formatter.go +++ b/output/formatter.go @@ -45,12 +45,12 @@ Summary: ` var json = `{ - "metrics": [ - Files: {{.Stats.NumFiles}}, - Lines: {{.Stats.NumLines}}, - Nosec: {{.Stats.NumNosec}}, - Issues: {{.Stats.NumFound}}], - + "metrics": { + "files": {{.Stats.NumFiles}}, + "lines": {{.Stats.NumLines}}, + "nosec": {{.Stats.NumNosec}}, + "issues": {{.Stats.NumFound}} + }, "issues": [ {{ range $index, $issue := .Issues }}{{ if $index }}, {{ end }}{ "file": "{{ $issue.File }}",