Skip to content

Commit

Permalink
Merge pull request #291 from accurics/bugfix/xml-output
Browse files Browse the repository at this point in the history
fix xml output
  • Loading branch information
Willie authored Aug 18, 2020
2 parents 85e88e4 + 2719aac commit c44a663
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion pkg/policy/types.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package policy

import (
"encoding/xml"

"github.com/accurics/terrascan/pkg/iac-providers/output"
"github.com/accurics/terrascan/pkg/results"
)
Expand All @@ -12,5 +14,6 @@ type EngineInput struct {

// EngineOutput Contains data output from the engine
type EngineOutput struct {
*results.ViolationStore `json:"results" yaml:"results" xml:"results,attr"`
XMLName xml.Name `json:"-" yaml:"-" xml:"results"`
*results.ViolationStore `json:"results" yaml:"results" xml:"results"`
}
4 changes: 2 additions & 2 deletions pkg/results/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ type ViolationStats struct {

// ViolationStore Storage area for violation data
type ViolationStore struct {
Violations []*Violation `json:"violations" yaml:"violations" xml:"violations,attr"`
Count ViolationStats `json:"count" yaml:"count" xml:"count,attr"`
Violations []*Violation `json:"violations" yaml:"violations" xml:"violations>violation"`
Count ViolationStats `json:"count" yaml:"count" xml:"count"`
}

0 comments on commit c44a663

Please sign in to comment.