File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ var analyzeCmd = &cobra.Command{
250250
251251 log .Println ("Running all configured tools..." )
252252
253- if outputFormat == "sarif" {
253+ if outputFormat == "sarif" && outputFile != "" {
254254 // Create temporary directory for individual tool outputs
255255 tmpDir , err := os .MkdirTemp ("" , "codacy-analysis-*" )
256256 if err != nil {
Original file line number Diff line number Diff line change @@ -43,9 +43,18 @@ type Driver struct {
4343}
4444
4545type Rule struct {
46- ID string `json:"id"`
47- ShortDescription MessageText `json:"shortDescription"`
48- Properties map [string ]interface {} `json:"properties"`
46+ ID string `json:"id"`
47+ ShortDescription MessageText `json:"shortDescription"`
48+ Properties RuleProperties `json:"properties"`
49+ }
50+
51+ type RuleProperties struct {
52+ Priority int `json:"priority,omitempty"`
53+ Ruleset string `json:"ruleset,omitempty"`
54+ Tags []string `json:"tags,omitempty"`
55+ // Add other common properties that might be present
56+ Precision string `json:"precision,omitempty"`
57+ SecuritySeverity string `json:"security-severity,omitempty"`
4958}
5059
5160type Result struct {
You can’t perform that action at this time.
0 commit comments