ort icon indicating copy to clipboard operation
ort copied to clipboard

Add more structure to the source of ORT issues

Open oheger-bosch opened this issue 4 years ago • 1 comments

For some use cases it is necessary to match specific issues reported during an ORT execution. For instance, with resolutions some issues should be waived, or the new notifier module should send specific notifications when certain issues are found.

Such matching is currently difficult, however, because the OrtIssue class has not sufficient information to uniquely filter out specific issues. There is a single string property for the source of the issue, which - by convention - is set to the component (like analyzer, advisor, ...) that created the issue. Other than that, one typically has to match with regular expressions against the issue's message, which is fragile when there is a change in wording. Often, the message contains the coordinates of a package the issue is about.

To simplify identifying specific issues, some additional (optional) properties could be added to OrtIssue. The exact amount of properties is up to discussion; I would consider the following properties helpful:

  • An optional Identifier (or a string with package coordinates), which is set if the issue is related to a specific package.
  • An ORT-specific error code: This is not trivial, since it requires some sort of terminology of possible ORT errors, and means would be needed to manage this terminology and keep it consistent; but it would be very useful to make issues machine-readable and to understand what exactly went wrong.

oheger-bosch avatar Aug 25 '21 10:08 oheger-bosch

  • An optional Identifier (or a string with package coordinates), which is set if the issue is related to a specific package.

This could be done similar to 521640b4f55edfbfb357f65a12db480eb9521474.

sschuberth avatar Jun 03 '24 09:06 sschuberth