Use ACE editor annotations to show Groovy syntax errors

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Antonio Muñiz
            Reporter:
            Antonio Muñiz
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: