One finding container; callers must sanitize fields before construction.
This dataclass does not mask or validate supplied strings. The bundled
evaluator uses fixed diagnostics and empty excerpts, never input content.
Source code in src/doublegate_sdk/checks.py
| @dataclass(frozen=True, slots=True)
class Finding:
"""One finding container; callers must sanitize fields before construction.
This dataclass does not mask or validate supplied strings. The bundled
evaluator uses fixed diagnostics and empty excerpts, never input content.
"""
kind: str
severity: str
detail: str
start: int = 0
end: int = 0
excerpt: str = ""
def to_dict(self) -> dict[str, Any]:
return {"kind": self.kind, "severity": self.severity, "detail": self.detail,
"start": self.start, "end": self.end, "excerpt": self.excerpt}
|
severity
instance-attribute
detail
instance-attribute
start
class-attribute
instance-attribute
end
class-attribute
instance-attribute
excerpt
class-attribute
instance-attribute
to_dict
to_dict() -> dict[str, Any]
Source code in src/doublegate_sdk/checks.py
| def to_dict(self) -> dict[str, Any]:
return {"kind": self.kind, "severity": self.severity, "detail": self.detail,
"start": self.start, "end": self.end, "excerpt": self.excerpt}
|