I just subscribed a Sonarcloud plan, integrated with Github, in the first run i receive the following error:
The last analysis has failed. If it keeps on failing after several attempts, please contact us on Community forum and provide the following failing analysis ID: “AXg_jAylW1CZcH60rYDr”.
My repository remains in
“Your default branch has not been analyzed yet.”
I see you are using our Autoscan feature to analyze your code. It seems our PHP analyzer runs out of memory while analyzing your project in the Autoscan environment. The project seems fairly large (more than 7k files), so this outcome is not entirely surprising. We constantly improve the performance of our analyzers, so we may be able to handle such projects with Autoscan.
In the meantime, to start analyzing your project, I recommend setting up the analysis with a CI system, where you will be able to allocate more memory for the analysis. Since you are on GitHub, a setup with GitHub Actions may be suitable for you, and we have documentation for that.
Hello Jason,
thankyou for your reply.
We created the github action and computed the master branch (with the upgrade of the plan at 1M lines).
But now we face another problem: every pull request semms to compute all files and not only the differences.
Our configuration for Github Action is attached.
name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
sonar-project.properties:
sonar.projectKey=ADAM-ITALIA_adamweb
sonar.organization=adam-italia
# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=adamweb
#sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
sonar.exclusions=**/test/**;packages/External/**;script/**;work/**;file/**;**/*.xml
sonar.coverage.exclusions=**/**
sonar.cpd.exclusions=**/**