-
Improvement
-
Resolution: Fixed
-
Major
-
None
Currently errors from pipeline JSON to PMD are returned in a textual way that makes it awkward for tools to consume them and display appropriate contextual errors, for example:
At /pipeline/stages/1/branches/0/steps: Array has 0 entries, requires minimum of 1
It would be helpful if these errors were split somehow into a location and message, e.g.:
{ location: '/pipeline/stages/1/branches/0/steps', message: 'Array has 0 entries, requires minimum of 1' }
or even:
{ location: [ 'pipeline', 'stages', 1, 'branches', 0, 'steps' ], code: 'EMPTY_ARRAY_NOT_ALLOWED', message: 'Array has 0 entries, requires minimum of 1' }
Or maybe something different.
This would make it easier for tools to consume without having to parse a potentially volatile (and localized) text format.
- links to