It often occurs that a small typo in an otherwise correct script is the reason for a failed build. A basic syntax validation or highlighting feature would prevent this.
There are working highlighting solutions like hightlight.js (
https://highlightjs.org/) and pygments (
http://pygments.org/), which both already support Groovy.