Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4HkWoC7hLzk61vZa8
27 lines
1.1 KiB
Java
27 lines
1.1 KiB
Java
package com.ankurm.prreviewer;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
|
|
|
|
/**
|
|
* One claim made by the model. Nothing in it is trusted yet: {@link LineGuard} decides whether
|
|
* {@code line} and {@code quote} really point at a line this pull request added.
|
|
*/
|
|
public record Finding(
|
|
@JsonPropertyDescription("Line number in the new file, copied from the left column of the diff")
|
|
int line,
|
|
@JsonPropertyDescription("The exact code on that line, copied character for character, without the line number and + marker")
|
|
String quote,
|
|
Severity severity,
|
|
Category category,
|
|
@JsonPropertyDescription("Short headline, under 80 characters")
|
|
String title,
|
|
@JsonPropertyDescription("Why this is a problem, one or two sentences")
|
|
String comment,
|
|
@JsonPropertyDescription("Replacement code or a concrete fix; empty string if none")
|
|
String suggestion) {
|
|
|
|
Finding atLine(int newLine) {
|
|
return new Finding(newLine, quote, severity, category, title, comment, suggestion);
|
|
}
|
|
}
|