Skip to content

Commit 869bcb6

Browse files
authored
Merge pull request #171 from insideapp-oss/develop
Release 0.5.0
2 parents d14c070 + 74e172b commit 869bcb6

File tree

102 files changed

+6145
-10513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+6145
-10513
lines changed

.github/workflows/maven.yml

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,53 @@
11
name: CI
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
- develop
8-
pull_request:
9-
branches:
10-
- master
11-
- develop
3+
on: [push]
124

135
jobs:
146
build:
157
runs-on: ubuntu-latest
168
steps:
17-
- uses: actions/[email protected]
9+
10+
- name: Checkout
11+
uses: actions/[email protected]
12+
with:
13+
fetch-depth: 0
14+
1815
- name: Set up JDK 1.11
19-
uses: actions/setup-java@v2.3.0
16+
uses: actions/setup-java@v3.11.0
2017
with:
2118
distribution: 'adopt'
2219
java-version: '11'
2320
check-latest: true
2421
cache: 'maven'
25-
- name: Build with Maven
22+
23+
- name: License Header Check
24+
run: mvn license:check
25+
26+
- name: Build
2627
run: mvn -B package --file pom.xml
27-
- name: Upload coverage to Codecov
28-
uses: codecov/[email protected]
29-
with:
30-
token: ${{ secrets.CODECOV_TOKEN }} #required
31-
- id: get-version
32-
name: Get maven project version
33-
uses: jactions/[email protected]
34-
- name: Upload plugin artifact
35-
uses: actions/[email protected]
28+
29+
- name: Analyze
30+
env:
31+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
35+
-Dsonar.login=$SONAR_TOKEN \
36+
-Dsonar.host.url=https://sonarcloud.io \
37+
-Dsonar.organization=insideapp-oss \
38+
-Dsonar.projectKey=insideapp-oss_sonar-flutter
39+
40+
- name: Read version
41+
run: echo "version=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)" >> $GITHUB_ENV
42+
43+
- name: Upload snapshot release
44+
if: github.ref == 'refs/heads/develop'
45+
uses: svenstaro/upload-release-action@v2
3646
with:
37-
name: plugin
38-
path: sonar-flutter-plugin/target/sonar-flutter-plugin-${{ steps.get-version.outputs.version }}.jar
47+
repo_token: ${{ secrets.GITHUB_TOKEN }}
48+
file: ${{github.workspace}}/sonar-flutter-plugin/target/*.jar
49+
tag: ${{env.version}}
50+
overwrite: true
51+
body: "Snapshot release"
52+
file_glob: true
53+
prerelease: true

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,54 @@
1-
name: Publish release
1+
name: Release
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
tags:
6+
- 0.*
67

78
jobs:
89
build:
9-
name: Build and upload release
10+
1011
runs-on: ubuntu-latest
12+
1113
steps:
12-
- uses: actions/[email protected]
14+
- name: Checkout
15+
uses: actions/[email protected]
16+
17+
- name: Retrieve tag name
18+
uses: olegtarasov/[email protected]
19+
id: tag_name
20+
1321
- name: Set up JDK 1.11
14-
uses: actions/setup-java@v2.3.0
22+
uses: actions/setup-java@v3.11.0
1523
with:
1624
distribution: 'adopt'
1725
java-version: '11'
1826
check-latest: true
1927
cache: 'maven'
20-
- name: Build with Maven
28+
29+
- name: Set version
30+
run: mvn versions:set -DnewVersion=$GIT_TAG_NAME
31+
32+
- name: Build
2133
run: mvn -B package --file pom.xml
22-
- name: Upload release artifact
23-
uses: shogo82148/[email protected]
34+
35+
- name: Analyze
36+
env:
37+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: |
40+
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
41+
-Dsonar.login=$SONAR_TOKEN \
42+
-Dsonar.host.url=https://sonarcloud.io \
43+
-Dsonar.organization=insideapp-oss \
44+
-Dsonar.projectKey=insideapp-oss_sonar-flutter
45+
46+
- name: Upload release
47+
uses: svenstaro/upload-release-action@v2
2448
with:
25-
upload_url: ${{ github.event.release.upload_url }}
26-
asset_path: sonar-flutter-plugin/target/sonar-flutter-plugin-*.jar
49+
repo_token: ${{ secrets.GITHUB_TOKEN }}
50+
file: ${{github.workspace}}/sonar-flutter-plugin/target/*.jar
51+
tag: ${{ steps.tag_name.outputs.tag }}
52+
overwrite: true
53+
body: ${{steps.build_changelog.outputs.changelog}}
54+
file_glob: true

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
close-issues:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v4.0.0
10+
- uses: actions/stale@v8.0.0
1111
with:
1212
days-before-issue-stale: 90
1313
days-before-issue-close: 14

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 117 deletions
This file was deleted.

.mvn/wrapper/maven-wrapper.jar

-49.5 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,75 @@
1-
## Please check the Github releases for newer changelogs!
1+
# Changelog
22

3-
---
3+
## 0.5.0
4+
5+
#### Breaking
6+
7+
- SonarQube API update to 7.9 for latest LTS support (9.9)
8+
- Removed `dartanalyzer` implementation that scans each file individual, this may affect projects running on a (pretty) old Dart SDK.
9+
The replacement runs legacy `dartanalyzer .` instead which is much faster.
10+
- Renamed `sonar.flutter.analyzer.mode` to `sonar.dart.analyzer.mode` and reworked implementation.
11+
- Available options `DETECT|DART|FLUTTER|MANUAL|DARTANALYZER`
12+
- Defaults to automatic detection by parsing the `pubspec.yaml`.
13+
- Uses `flutter analyze` when `environment.flutter` is configured in `pubspec.yaml`.
14+
- Uses `dart analyze` when `environment.flutter` is NOT configured in `pubspec.yaml`.
15+
- Allows to be configured for legacy `dartanalyzer` if required (`DARTANALYZER`)
16+
- Allows to be configured for pre-existing analysis reports (`MANUAL`)
17+
- Renamed `sonar.dart.analysis.useExistingOptions` to `sonar.dart.analyzer.options.override`, now defaults to `true`
18+
- Renamed `sonar.dart.analysis.reportPath` to `sonar.dart.analyzer.report.path` - this is only evaluated when `sonar.dart.analyzer.mode`is set to `MANUAL`
19+
- Added `sonar.dart.analyzer.report.mode` option
20+
- Available options `DETECT|MACHINE|LEGACY`
21+
- Defaults to automatic detection by parsing the Dart SDK version and defaults to `--format=machine` for Dart when SDK >= 2.12
22+
- Can be set to legacy mode when using pre-existing analysis report or an older Dart SDK
23+
24+
#### Experimental
25+
26+
- None.
27+
28+
#### Enhancements
29+
30+
- Add a `pubspec.yaml` sensor which adds the file to SonarQube and allow showing lints for this file
31+
- Add support for multi-module projects (`sonar.modules=mylib,mylib_generator,example`)
32+
- Added missing dart keywords and corrected some
33+
- `try`
34+
- `hide`
35+
- `show`
36+
- `late`
37+
- `of`
38+
- `continue`
39+
- `covariant`
40+
- `out`
41+
- `do`
42+
- `dynamic`
43+
- `native`
44+
- Rules update
45+
- Better rules description
46+
47+
#### Bug Fixes
48+
49+
- [#160](https://github.com/insideapp-oss/sonar-flutter/issues/160) dart analysis with an exception of NumberFormatException
50+
51+
52+
## 0.4.0
53+
54+
#### Breaking
55+
56+
- None.
57+
58+
#### Experimental
59+
60+
- None.
61+
62+
#### Enhancements
63+
64+
- (#65) Support SonarQube 9 - (thanks to @kuhnroyal)
65+
- (#32) make perfer final issue type to CODE_SMELL - (thanks to @magaofei)
66+
- (#70) Automate changelog and releases - (thanks to @kuhnroyal)
67+
- (#66) CI improvements - (thanks to @kuhnroyal)
68+
- (#56) Update README.md - (thanks to @thiagoloureiro)
69+
70+
#### Bug Fixes
71+
72+
- None.
473

574
## 0.3.2
675

0 commit comments

Comments
 (0)