Skip to content

Commit 4c28a34

Browse files
authored
Merge pull request #78 from olexale/gen_code_formatting
Format generated files
2 parents ad5ecf6 + f4e43dc commit 4c28a34

14 files changed

Lines changed: 72 additions & 31 deletions

File tree

.github/workflows/dart.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020

2121
- name: 🐦 Setup Flutter SDK
22-
uses: flutter-actions/setup-flutter@v1
22+
uses: flutter-actions/setup-flutter@v3
2323
with:
24-
version: '3.19.4'
24+
channel: stable
25+
version: '3.22.1'
2526

2627
- name: 🛠 Install dependencies
2728
run: flutter pub get
@@ -37,9 +38,17 @@ jobs:
3738

3839
- name: 🎯 Check Code Coverage
3940
uses: VeryGoodOpenSource/very_good_coverage@v1
40-
41+
4142
- name: 🥇 Update coverage badge
4243
if: github.event_name != 'pull_request'
4344
uses: coverallsapp/github-action@1.1.3
4445
with:
4546
github-token: ${{ secrets.github_token }}
47+
48+
- name: 📈 Check pana
49+
run: |
50+
flutter pub global activate pana
51+
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p")
52+
echo "score: $PANA_SCORE"
53+
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1]
54+
if (( $SCORE < $TOTAL )); then echo "minimum score not met!"; exit 1; fi

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [1.7.4] - Code formatting
2+
3+
* Generated code is now properly formatted
4+
15
## [1.7.3] - Integration test improvements
26

37
* Integration test imports will not be added if `integration_test` package is not added to `dev_dependencies`

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Feature: Counter
88

99
Run
1010
```
11-
flutter packages pub run build_runner watch --delete-conflicting-outputs
11+
dart run run build_runner watch --delete-conflicting-outputs
1212
```
1313

1414
The output Dart file would be:

example/integration_test/sample_test.dart

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import FlutterMacOS
66
import Foundation
77

8+
import patrol
89

910
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
11+
PatrolPlugin.register(with: registry.registrar(forPlugin: "PatrolPlugin"))
1012
}

example/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ dependencies:
1010
dev_dependencies:
1111
bdd_widget_test:
1212
path: ../
13-
build_runner: ^2.4.6
13+
build_runner: ^2.4.10
1414
integration_test:
1515
sdk: flutter
1616
flutter_test:
1717
sdk: flutter
1818
flutter_driver:
1919
sdk: flutter
20-
patrol: ^2.3.0
20+
patrol: ^3.7.2

example/test/patrol.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ Feature: Counter
88
Background:
99
Given the patrol app is running
1010

11-
@scenarioParams: nativeAutomation: true
11+
@scenarioParams: semanticsEnabled: false
1212
Scenario: Initial counter value is 0
1313
Then I see {'0'} label

example/test/patrol_test.dart

Lines changed: 9 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/test/sample_test.dart

Lines changed: 8 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/test/songs_test.dart

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)