sonar.scanner.dumpToFile vs .scannerwork/report-task.txt

We’re using SonarQube 10.2, and run some CICD from github action with latest ubuntu runner.

We run following 2 actions in sequence:

  • sonarsource/sonarqube-scan-action@master
  • sonarsource/sonarqube-quality-gate-action@master

Everything is OK, the scan action generates a file at .scannerwork/report-task.txt, and the quality gate action will read this file.

However, when I add a new config sonar.scanner.dumpToFile="some_file_path" in sonar-project.properties, the dump file is generated, but there’s no more .scannerwork/report-task.txt, and the quality gate action failed due to lack of report-task.txt.

I would like to know is there any interference between the config sonar.scanner.dumpToFile and .scannerwork/report-task.txt

Hello @copdips ,

This property sonar.scanner.dumpToFile will make your scanner run in a simulated mode (as you would see in the logs), which means no execution of the analyzers will happen and no report-task.txt will be generated.

This property is meant to be used for debugging what properties are passed during scanner execution.

On our side, we will try to improve documentation on that so that it won’t be misleading.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.