When running Sonar Cloud workflow for our python repository we are getting java.lang.StackOverflowError: null error. We narrowed down the problem and the issue existed here plugins/module_utils/network/ios/rm_templates . We added the path as sonar exclusion and it worked.
This path has 31 python files which contains complex regexes.
My question is how to resolve this error while including these files as we want sonar to scan these too.
Thanks for reaching out. I was able to reproduce the issue locally. I’ve created a ticket on our side to track this.
In the mean time, it seems that increasing the stack size is fixing the issue. Locally, setting SONAR_SCANNER_JAVA_OPTS="-Xss2m" as an environment variable made the analysis run successfully. This should also work when analyzing with the GitHub action by adding the environment variable to the env section of SonarSource/sonarqube-scan-action.