More structured results from checks
Something like:
struct CheckResult {
/// The name of the check that made the warning.
///
/// Checks may craft strings to incorporate configuration information for differentiation.
check: Cow<'static, str>,
/// The text of the problem (inline markdown allowed).
message: String,
/// Whether this is a fatal error or not.
status: Level,
/// Where in the codebase this check failed.
location: Location,
/// The specific commit that caused the issue.
commit: Option<CommitId>,
/// Suggestions for resolving the problem.
remedy: Option<String>,
}
Where the renderer can collate all the remedy
strings (instead of duplicating the Do: reformat
suggestion per ill-formatted commit). This would also allow for workflow tools to only cause noise on new kinds or locations of errors.
This will cause another major bump in git-checks
, but git-checks-core
will just go to 2.0, so this is probably fine.