File tree Expand file tree Collapse file tree 3 files changed +76
-13
lines changed Expand file tree Collapse file tree 3 files changed +76
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Sonar Flutter Example
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : 📚 Git Checkout
13
+
14
+
15
+ - name : Get Flutter Version From FVM config
16
+ id : get_flutter_version
17
+ run : echo "::set-output name=version::$(cat .fvm/fvm_config.json | jq -r '.flutterSdkVersion')"
18
+
19
+ - name : 🐦 Setup Flutter
20
+
21
+ with :
22
+ flutter-version : ${{ steps.get_flutter_version.outputs.version }}
23
+ channel : stable
24
+ cache : true
25
+ cache-key : flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
26
+
27
+ - name : 📦 Install Dependencies
28
+ run : flutter pub get
29
+
30
+ - name : 🧪 Run Tests
31
+ run : flutter test --machine --coverage > tests.output
32
+
33
+ - name : 🪲 Run Sonar
34
+ uses : sonarsource/sonarqube-scan-action@master
35
+ env :
36
+ SONAR_TOKEN : ${{secrets.SONAR_TOKEN}}
37
+ SONAR_HOST_URL : ${{secrets.SONAR_HOST_URL}}
38
+
Original file line number Diff line number Diff line change 1
- # sonar_flutter_example
1
+ # Sonar Flutter Example
2
2
3
- A new Flutter project .
3
+ This project is a basic example of how to use the [ sonar-flutter plugin ] ( https://github.com/insideapp-oss/sonar-flutter ) .
4
4
5
- ## Getting Started
5
+ ## Features
6
6
7
- This project is a starting point for a Flutter application.
8
-
9
- A few resources to get you started if this is your first Flutter project:
10
-
11
- - [ Lab: Write your first Flutter app] ( https://docs.flutter.dev/get-started/codelab )
12
- - [ Cookbook: Useful Flutter samples] ( https://docs.flutter.dev/cookbook )
13
-
14
- For help getting started with Flutter development, view the
15
- [ online documentation] ( https://docs.flutter.dev/ ) , which offers tutorials,
16
- samples, guidance on mobile development, and a full API reference.
7
+ - Github Actions setup example
Original file line number Diff line number Diff line change
1
+ # Project identification
2
+ sonar.projectKey =sonar_flutter_example
3
+ sonar.projectName =Sonar Flutter Example
4
+ sonar.projectVersion =1.0
5
+
6
+ # Source code location.
7
+ # Path is relative to the sonar-project.properties file. Defaults to .
8
+ # Use commas to specify more than one file/folder.
9
+ # It is good practice to add pubspec.yaml to the sources as the analyzer
10
+ # may produce warnings for this file as well.
11
+ sonar.sources =lib,pubspec.yaml
12
+ sonar.tests =test
13
+
14
+ # Encoding of the source code. Default is default system encoding.
15
+ sonar.sourceEncoding =UTF-8
16
+
17
+ # Analyzer mode
18
+ # Can be:
19
+ # - DETECT (attempt to detect automatically) - default
20
+ # - MANUAL (an existing report needs to be provided)
21
+ # - FLUTTER (flutter analyze)
22
+ # - DART (dart analyze)
23
+ # - DARTANALYZER (dartanalyzer)
24
+ # sonar.dart.analyzer.mode=
25
+
26
+ # Allows reuse of an existing analyzer report when mode is MANUAL
27
+ # sonar.dart.analyzer.report.path=
28
+
29
+ # Analyzer report output mode
30
+ # Can be:
31
+ # - DETECT (attempt to detect automatically, requires Dart SDK on the PATH) - default
32
+ # - MACHINE (a new machine readable output that is available for Dart 2.12+)
33
+ # - LEGACY (attempts to parse human readable output from dart/flutter) - default
34
+ # sonar.dart.analyzer.report.mode=
You can’t perform that action at this time.
0 commit comments