Hello! I am requesting assistance with an odd issue, I have a private organization with a few projects. The projects are all configured the same and have pull request analysis enabled via BB pipelines.
One project claims there is no pull request analysis set up in the Pull Request tab on SonarCloud, however, the pull request in Bitbucket has the sonarcloud widget loading and the logs of the analysis claim it was a successful run.
The only difference between this project and others is that we run the analysis only on the backend portion of the source code. I.e. We have a frontend that is in the same repository that we are not including in the analysis.
I have destroyed and re-created the project twice in SonarCloud (making sure to update the token that sonar cloud expects to find in the repository variables).
Any assistance would be greatly appreciated.
I have looked at some of the API calls that are made by the scanner to fetch open pull requests for a project and curiously, this project returns an empty array – there are open pull requests that have been analyzed.
- ALM used: Bitbucket
- CI system used: Bitbucket Cloud
- Scanner command used when applicable:
- step: &full_sast
size: 2x
name: Full SAST scan
script:
- pipe: sonarsource/sonarcloud-scan:3.0.0
variables:
EXTRA_ARGS:
- '-Dsonar.organization=<PRIVATE_ORGANIZATION>'
- '-Dsonar.projectKey=<PRIVATE_PROJECT_KEY>'
- '-Dsonar.exclusions=folder1,folder2'
- '-Dsonar.sources=folderToScan'
- '-Dsonar.tests=cypress'
- '-Dsonar.host.url=https://sonarcloud.io'
- '-Dsonar.verbose=true'
SONAR_SCANNER_OPTS: '-Xmx3500m'
- Languages of the repository: JS + (HTML/CSS), and PHP
Analysis is only done on the PHP code.
- Only if the SonarCloud project is public, the URL
- And if you need help with pull request decoration, then the URL to the PR too
- Error observed (wrap logs/code around with triple quotes ``` for proper formatting): No apparent errors, the analysis was successful.
- Steps to reproduce: create a PR
- Potential workaround: I can view the branch the PR is a part of to view the results.
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
I would be happy to provide further information in a private thread.
Thank you!
- Andrew