To essentially explain the issue here, I’ve got an Unreal Engine 5 project that I’m trying to scan with SonarCloud. So far I’ve succeeded in getting it to scan properly, but the scan takes an unacceptably long time to complete. The project has about 2.5k lines of C++ code, and only takes about 2 minutes to build. Meanwhile, the scan takes about 2 hours on average. I’ve never encountered this with a C++ project before, and I’m wondering what the cause might be here.
So my question is, has anyone worked with an Unreal Engine project before with either SonarCloud or SonarQube and managed to get it to scan in a more reasonable time, and if so, what exactly did you do to reduce the amount of time it takes to scan.
My first thought might be the include files, as Unreal Engine includes a lot of header files within their own headers, thus adding more code for SonarQube to process.
Template for a good new topic, formatted with Markdown:
-
ALM used: GitHub
-
CI system used: GitHub Actions (Self-Hosted Runner)
-
Scanner command used when applicable:
& $env:SONAR_DIRECTORY/build-wrapper-win-x86/build-wrapper-win-x86-64.exe --out-dir bw-output “C:\Program Files\Epic Games\UE_5.3\Engine\Binaries\DotNet\UnrealBuildTool\UnrealBuildTool.exe” <Absolute path of .uproject file> UnrealEditor Win64 DebugGame
& $env:SONAR_SCANNER_HOME/bin/sonar-scanner.bat --define sonar.cfamily.build-wrapper-output=bw-output -D sonar.host.url=https://sonarcloud.io -D sonar.cfamily.cobertura.reportPaths=coverage.xml -
Unreal Engine C++/Python
-
URL: https://sonarcloud.io/project/overview?id=fcorso2016_unreal-pokemon
-
Steps to reproduce:
- Create new Unreal Engine C++ project
- Build project using the build wrapper on Windows
- Perform scan, should take a long time
-
Potential workaround: None so far