Hi, sonarcloud , I create a Github action to analysis a project with both Java and JavaScript using maven command .Both Java and JavaScript were building successful. JavaScript source file was build by plugin in pom.xml file . As a result ,Java source files were analyzed correctly, but none of JavaScript were not.
Project url:
JavaScript source files are udner dolphinscheduler-ui/src folder .
Sonarcloud url:
https://sonarcloud.io/dashboard?id=apache-dolphinscheduler
You can see that at sonarcloud https://sonarcloud.io/code?id=apache-dolphinscheduler&selected=apache-dolphinscheduler%3Adolphinscheduler-ui the dolphinscheduler-ui folder is just one pom.xml file .
It seems that because I use maven command , sonarcloud treat the project as Java project and ignore JavaScript .
So,is there a way to analysis one project using both Java and JavaScript ?
I searched some result ,
said
Nothing has changed so far on the fact that one project must match one repo only.
And I tried this
using sonar.inclusions ,but get “file already indexed” error .
-
ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
GitHub -
CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
GitHub action -
Scanner command used when applicable (private details masked)
name: SonarCloud on: [push, pull_request] jobs: sonarCloudTrigger: name: SonarCloud Trigger runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: 8 - uses: actions/cache@v1 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-sonarqube restore-keys: | ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-sonarqube ${{ runner.os }}-maven- - name: Maven clean run: mvn clean - name: Run SonarCloud analyse run: > mvn clean --batch-mode org.jacoco:jacoco-maven-plugin:prepare-agent verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dmaven.test.skip=true -Dsonar.host.url=https://sonarcloud.io/ -Dsonar.organization=apache -Dsonar.projectKey=apache-dolphinscheduler env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- Languages of the repository
Java and JavaScript