Am I right you’re using this Sonar GitHub Action: GitHub - SonarSource/sonarqube-scan-action?
We’re currently investigating a potential issue with it when analyzing Dart or Flutter projects. Could you please try replacing it with simple bash:
- name: SonarCloud Scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
export SONAR_SCANNER_VERSION=6.1.0.4477
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux-x64
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux-x64.zip
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
export SONAR_SCANNER_OPTS="-server"
sonar-scanner \
-Dsonar.organization=your_org \
-Dsonar.projectKey=your_project_key\
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io
And get back to us with the results.