A regular stapler validation message is currently shown for Groovy syntax validation messages.
Since this validation messages are linked to source lines, it could take advantage of ACE editor annotation API to show this messages behind the affected line.
editor.getSession().setAnnotations([{ row: 1, column: 10, text: "Error message" type: "error" // also warning and information if needed }]);
row, column and text can be retrieved from the current error message, but for better design CpsFlowDefinition.DescriptorImpl.doCheckScript should be modified to return a JSON containing this data.
- depends on
-
JENKINS-32819 Pipeline compilation error detection broken when using CSRF detection
- Resolved
- is related to
-
JENKINS-31909 Groovy script syntax validation not working as expected
- Resolved
- links to