Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- what are you trying to achieve
- what have you tried so far to achieve this
Hi, I’m new here.
Our team is using SonarQube 9.3.0, running on a Ubuntu 20.04 AWS machine and I’ve added the plugin sonar-flutter-plugin-0.4.0.jar to the plugins folder. We have a mobile flutter project.
I’m trying to use it with GitHub, but on every PR, it was showing no code problems. I then checked the terminal on GitHub and saw this:
INFO: Running 'flutter analyze'...
ERROR: org.buildobjects.process.StartupException: Could not startup process 'flutter analyze'.
java.io.IOException: org.buildobjects.process.StartupException: Could not startup process 'flutter analyze'.
And a few lines below I’ve got this:
Caused by: java.io.IOException: Cannot run program "flutter": error=2, No such file or directory
So I think SonarQube is not finding my flutter. But when I run the following, as you can see, I have flutter and dart installed and on my path.
xxxx@ip-xxx-xx-xx-xx:~$ which flutter
/snap/bin/flutter
xxxx@ip-xxx-xx-xx-xx:~$ which dart
/usr/bin/dart
Here is my config files:
.github/workflows/build.yml
name: Build
on:
push:
branches: [master, develop] # or the name of your main branch
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# We do not recommend to use this in a pull request. Prefer using pull request
# decoration instead.
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
sonar-project.properties
# Project identification
sonar.projectKey=my_key
# Source code location.
# Path is relative to the sonar-project.properties file. Defaults to .
# Use commas to specify more than one folder.
sonar.sources=proj/lib
# sonar.tests=test
# Encoding of the source code. Default is default system encoding.
sonar.sourceEncoding=UTF-8
# Allows reuse of an existing analyzer report
# sonar.dart.analysis.reportPath=
# Analyzer mode
# Can be:
# - flutter (flutter analyze) - default
# - dart (dart analyze)
# - legacy (dartanalyzer)
# sonar.flutter.analyzer.mode=
I don’t know what to try anymore. ![]()
Could someone help me??