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

Use ACE editor annotations to show Groovy syntax errors

    • 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.

          [JENKINS-32067] Use ACE editor annotations to show Groovy syntax errors

          Antonio Muñiz created issue -
          Antonio Muñiz made changes -
          Link New: This issue is related to JENKINS-31909 [ JENKINS-31909 ]
          Antonio Muñiz made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-31909 [ JENKINS-31909 ]
          Jesse Glick made changes -
          Link Original: This issue is related to JENKINS-31909 [ JENKINS-31909 ]
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-31909 [ JENKINS-31909 ]
          Jesse Glick made changes -
          Link Original: This issue depends on JENKINS-31909 [ JENKINS-31909 ]
          Antonio Muñiz made changes -
          Remote Link New: This issue links to "PR 281 (Web Link)" [ 13740 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Jesse Glick made changes -
          Link New: This issue depends on JENKINS-32819 [ JENKINS-32819 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 167546 ] New: JNJira + In-Review [ 198227 ]

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

              Created:
              Updated:
              Resolved: