Compile them

http://docs.groovy-lang.org/latest/html/documentation/tools-groovyc.html

Scan them with Sonar

<properties>
    <sonar.inclusions>**/src/main/groovy/**</sonar.inclusions>
    <sonar.sources>.</sonar.sources>
</properties>