Skip to content

Commit b9bb302

Browse files
committed
Add more details to the infringement
1 parent 1c3090f commit b9bb302

File tree

1 file changed

+6
-1
lines changed
  • components/ee/agent-smith/pkg/agent

1 file changed

+6
-1
lines changed

components/ee/agent-smith/pkg/agent/agent.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ func (ws InfringingWorkspace) DescribeInfringements(charCount int) string {
184184
type Infringement struct {
185185
Description string
186186
Kind config.GradedInfringementKind
187+
CommandLine []string
187188
}
188189

189190
// defaultRuleset is the name ("remote origin URL") of the default enforcement rules
@@ -280,7 +281,11 @@ func (agent *Smith) Start(ctx context.Context, callback func(InfringingWorkspace
280281
InstanceID: proc.Workspace.InstanceID,
281282
GitRemoteURL: []string{proc.Workspace.GitURL},
282283
Infringements: []Infringement{
283-
{Kind: config.GradeKind(config.InfringementExec, common.Severity(cl.Level)), Description: fmt.Sprintf("%s: %s", cl.Classifier, cl.Message)},
284+
{
285+
Kind: config.GradeKind(config.InfringementExec, common.Severity(cl.Level)),
286+
Description: fmt.Sprintf("%s: %s", cl.Classifier, cl.Message),
287+
CommandLine: proc.CommandLine,
288+
},
284289
},
285290
})
286291
}

0 commit comments

Comments
 (0)