Merge pull request #11 from csstaub/cs/fix-json

Make sure -fmt json produces valid output
This commit is contained in:
Grant Murphy 2016-07-25 16:16:29 -07:00 committed by GitHub
commit 37cc56d425

View file

@ -45,12 +45,12 @@ Summary:
` `
var json = `{ var json = `{
"metrics": [ "metrics": {
Files: {{.Stats.NumFiles}}, "files": {{.Stats.NumFiles}},
Lines: {{.Stats.NumLines}}, "lines": {{.Stats.NumLines}},
Nosec: {{.Stats.NumNosec}}, "nosec": {{.Stats.NumNosec}},
Issues: {{.Stats.NumFound}}], "issues": {{.Stats.NumFound}}
},
"issues": [ "issues": [
{{ range $index, $issue := .Issues }}{{ if $index }}, {{ end }}{ {{ range $index, $issue := .Issues }}{{ if $index }}, {{ end }}{
"file": "{{ $issue.File }}", "file": "{{ $issue.File }}",