ALM: GitHub
CI: Github
Scanner command:
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=lorum
-Dsonar.projectKey=monoreponame-${{matrix.project}}
-Dsonar.projectName=monoreponame-${{matrix.project}}
-Dsonar.javascript.lcov.reportPaths=test-results/coverage/${{matrix.project}}/lcov.info
-Dsonar.test.inclusions=**/*.spec.ts
-Dsonar.sources=${{matrix.type}}/${{matrix.project}}
-Dsonar.typescript.tsconfigPath=${{matrix.type}}/${{matrix.project}}/tsconfig.json
-Dsonar.verbose=true
Languages: Typescript
Error: Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration
Workaround:
- Creating and adding each new project (app/lib) manually to Sonarcloud.
- Do a manual run to bypass the problem.
Problem: within our monorepo the amount of libs and apps is growing quite rapidly. The problem is gennerally a new app/lib is introduced by a pullrequest. So far as i know Sonarcloud expects a run on a main branch before allowinng pull requests, which works great for non monorepo projects.