Skip to content

Commit

Permalink
Add default rules to driver
Browse files Browse the repository at this point in the history
  • Loading branch information
owenrumney committed Dec 24, 2021
1 parent da2cfcb commit 3647f9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions v2/sarif/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func NewRunWithInformationURI(toolName, informationURI string) *Run {
Driver: &ToolComponent{
Name: toolName,
InformationURI: &informationURI,
Rules: []*ReportingDescriptor{},
},
},
Results: []*Result{},
Expand Down
4 changes: 3 additions & 1 deletion v2/sarif/tool_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ type ToolComponent struct {
// NewDriver creates a new Driver and returns a pointer to it
func NewDriver(name string) *ToolComponent {
return &ToolComponent{
Name: name,
Name: name,
Rules: []*ReportingDescriptor{},
}
}

Expand All @@ -48,6 +49,7 @@ func NewVersionedDriver(name, version string) *ToolComponent {
return &ToolComponent{
Name: name,
Version: &version,
Rules: []*ReportingDescriptor{},
}
}

Expand Down

0 comments on commit 3647f9f

Please sign in to comment.