When using SonarCloud for the newly Flutter / Dart support, I get errors like:
- Target of URI doesn’t exist: ‘package:dio/dio.dart’
- Undefined class ‘CancelToken’
Here are my GitHub action workflow:
- name: ₍₍🦋⁾⁾ Get dependencies
run: flutter pub get
- name: 🎯🏗️ Run build runner build
run: dart run build_runner build --delete-conflicting-outputs
- name: 🤖🔨 Build Android app
run: flutter build apk --debug --flavor development --dart-define="FLAVOR=development"
- 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 }}
My GitHub action builds my Flutter app just fine and I can run flutter analyze and flutter test just fine, but I do not know why SonarCloud fails?
Thank you
Søren