How many lines of code in total do you estimate in this project?
Do you confirm that in your current configuration the scanner has 7G available memory in the container?
How many lines of code in total do you estimate in this project?
Do you confirm that in your current configuration the scanner has 7G available memory in the container?
we have <= 100k lines of codes.
this is my pipeline config
clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly
definitions:
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
services:
docker:
memory: 7128
steps:
- step: &build-test-sonarcloud
size: 2x
name: Build, test and analyze on SonarCloud
caches:
- sonar
script:
- pipe: sonarsource/sonarcloud-scan:1.2.2
- step: &check-quality-gate-sonarcloud
size: 2x
name: Check the Quality Gate on SonarCloud
script:
- pipe: sonarsource/sonarcloud-quality-gate:0.1.4
pipelines:
pull-requests:
'**':
- step: *build-test-sonarcloud
size: 2x
- step: *check-quality-gate-sonarcloud
size: 2x
Another question from my colleague is that it is taking more than an hour to scan and every time it is scanning entire codes instead of change codes in pull request. Can you suggest please?
Thanks
I confirm that this is how the software works, today. Even on pull requests, the entire code is analyzed. Then, the scanner filters the result by the detected changed lines in the project, and only stores the relevant files and issues. So the overall analysis duration is not smaller than analyzing the entire project, for most analyzers. (We plan to improve this in the future.)
I let @Nils_Werner chime in about the memory needs and behavior of the analyzer, now that we understand better the composition of your project.