Skip to content

Commit b6d1e40

Browse files
feat: add extraFields to Result.Issue (OD-41) (#106)
1 parent 0b34588 commit b6d1e40

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • codacy-plugins-api/src/main/scala/com/codacy/plugins/api/results

codacy-plugins-api/src/main/scala/com/codacy/plugins/api/results/Result.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ object Result {
2222
override def toString: String = value
2323
}
2424

25+
/** @param extraFields
26+
* Tool-specific structured metadata as a raw JSON string (e.g. Trivy dependency chains).
27+
* Kept as a String to preserve this module's dependency-free, Scala-Native-friendly design;
28+
* JSON (de)serialization of the embedded value is handled by the codecs in codacy-plugins.
29+
*/
2530
case class Issue(filename: Source.File,
2631
message: Result.Message,
2732
patternId: Pattern.Id,
2833
line: Source.Line,
2934
suggestion: Option[Suggestion],
30-
sourceId: Option[String])
35+
sourceId: Option[String],
36+
extraFields: Option[String])
3137
extends Result
3238

3339
case class FileError(filename: Source.File, message: Option[ErrorMessage]) extends Result

0 commit comments

Comments
 (0)