Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32067

Use ACE editor annotations to show Groovy syntax errors

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • pipeline

      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.

            amuniz Antonio Muñiz
            amuniz Antonio Muñiz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: