@@ -114,30 +114,22 @@ func run() error {
114
114
successes += len (result .Successes )
115
115
116
116
for _ , fail := range result .Failures {
117
- // attempt to parse the policy ID section, skip if there are errors
117
+ fails = append ( fails , fmt . Sprintf ( "%s - %s" , result . Filename , fail . Message ))
118
118
policyID , err := getPolicyIDFromMetadata (fail .Metadata , policyIDKey )
119
119
if err != nil {
120
- fails = append (fails , fmt .Sprintf ("%s - %s" , result .Filename , fail .Message ))
121
120
continue
122
121
}
123
-
124
- fails = append (fails , fmt .Sprintf ("%s - %s: %s" , result .Filename , policyID , fail .Message ))
125
-
126
122
if ! contains (policiesWithFails , policyID ) {
127
123
policiesWithFails = append (policiesWithFails , policyID )
128
124
}
129
125
}
130
126
131
127
for _ , warn := range result .Warnings {
132
- // attempt to parse the policy ID section, skip if there are errors
128
+ warns = append ( warns , fmt . Sprintf ( "%s - %s" , result . Filename , warn . Message ))
133
129
policyID , err := getPolicyIDFromMetadata (warn .Metadata , policyIDKey )
134
130
if err != nil {
135
- warns = append (warns , fmt .Sprintf ("%s - %s" , result .Filename , warn .Message ))
136
131
continue
137
132
}
138
-
139
- warns = append (warns , fmt .Sprintf ("%s - %s: %s" , result .Filename , policyID , warn .Message ))
140
-
141
133
if ! contains (policiesWithWarns , policyID ) {
142
134
policiesWithWarns = append (policiesWithWarns , policyID )
143
135
}
0 commit comments