Groovy

Language-specific information about the way that SonarQube Cloud supports the analysis of Groovy.

Analysis Overview

The Groovy analyzer is designed to perform static code analysis on Groovy source code and scripts.

It is compatible with Groovy 4, excluding the incubating features.

Language-specific properties

You can discover and update the Groovy-specific properties in: Administration > General Settings > Languages > Groovy.

Troubleshooting

Some files are not analyzed or issues are missing

The Groovy analyzer processes files in size-based batches, and each batch is given an adaptive timeout to ensure the overall project analysis completes in a timely manner. If you notice that some files are not being analyzed or issues are missing, it is likely that one or more of these batches has timed out. When a batch times out, the analysis of files within that specific batch is skipped, and the scan continues with the next batch.

You can increase the baseline timeout value, which gives each batch more time to complete. This property can be adjusted in the UI:

  1. Go to Administration > General Settings > Declarative Rule Engine.

  2. Find the sonar.dre.groovy.baselineTimeout property and increase its value.

The property can be specified during the scanner invocation as well.

Last updated

Was this helpful?