Scan large source repos

I have a parent folder and 28 sub folders that I am trying to source code scan. We wrote a script to navigate to each sub folders - If I scan the parent folder I get memory error. Wrote a script to navigate to each sub folder. Is this the right way to scan?

export PATH=“/Users/xxx/sonar-scanner-5.0.1.3006-macosx/bin/:$PATH”
pwd

for dir in */; do
if [ -d “$dir” ]; then
(cd “$dir” && sonar-scanner
-Dsonar.projectKey=PRJ1
-Dsonar.host.url=http://localhost:9000
-Dsonar.token=sqp_6024a649dd44d7994c220fe7942393f15a4f234d
-Dsonar.java.binaries=.)
fi
done

Hi,

This isn’t ideal. You’ll likely not get the SCM data you need to properly identify new code and attribute issues.

What’s the memory error? Can you increase memory to the scanner?

 
Ann