Skip to content

Commit e741071

Browse files
authored
feat: update workflows, add spellcheck, update very_good_analysis (#16)
* update very good analysis * add spell check * flutter on workflow * Update .github/cspell.json Co-authored-by: Jochum van der Ploeg <[email protected]> * try to omit the thing
1 parent b46d764 commit e741071

File tree

6 files changed

+63
-36
lines changed

6 files changed

+63
-36
lines changed

.github/cspell.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2",
3+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
4+
"dictionaries": ["vgv_allowed", "vgv_forbidden"],
5+
"dictionaryDefinitions": [
6+
{
7+
"name": "vgv_allowed",
8+
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt",
9+
"description": "Allowed VGV Spellings"
10+
},
11+
{
12+
"name": "vgv_forbidden",
13+
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt",
14+
"description": "Forbidden VGV Spellings"
15+
}
16+
],
17+
"useGitignore": true
18+
}

.github/workflows/main.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,16 @@ jobs:
1616
semantic-pull-request:
1717
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
1818

19+
spell-check:
20+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
21+
with:
22+
includes: "**/*.md"
23+
modified_files_only: false
24+
1925
build:
2026
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
2127
with:
22-
flutter_version: 2.10.3
28+
flutter_version: 3.7.3
29+
30+
pana_score:
31+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include: package:very_good_analysis/analysis_options.2.4.0.yaml
1+
include: package:very_good_analysis/analysis_options.4.0.0.yaml

lib/src/models/test_event.dart

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class StartTestEvent extends TestEvent {
6363
required this.protocolVersion,
6464
required this.runnerVersion,
6565
required this.pid,
66-
required int time,
67-
}) : super(type: 'start', time: time);
66+
required super.time,
67+
}) : super(type: 'start');
6868

6969
/// {@macro start_test_event}
7070
factory StartTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -96,8 +96,8 @@ class AllSuitesTestEvent extends TestEvent {
9696
/// {@macro all_suites_test_event}
9797
const AllSuitesTestEvent({
9898
required this.count,
99-
required int time,
100-
}) : super(type: 'allSuites', time: time);
99+
required super.time,
100+
}) : super(type: 'allSuites');
101101

102102
/// {@macro all_suites_test_event}
103103
factory AllSuitesTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -118,8 +118,8 @@ class SuiteTestEvent extends TestEvent {
118118
/// {@macro suite_test_event}
119119
const SuiteTestEvent({
120120
required this.suite,
121-
required int time,
122-
}) : super(type: 'suite', time: time);
121+
required super.time,
122+
}) : super(type: 'suite');
123123

124124
/// {@macro suite_test_event}
125125
factory SuiteTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -141,8 +141,8 @@ class DebugTestEvent extends TestEvent {
141141
required this.suiteID,
142142
required this.observatory,
143143
required this.remoteDebugger,
144-
required int time,
145-
}) : super(type: 'debug', time: time);
144+
required super.time,
145+
}) : super(type: 'debug');
146146

147147
/// {@macro debug_test_event}
148148
factory DebugTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -171,8 +171,8 @@ class GroupTestEvent extends TestEvent {
171171
/// {@macro group_test_event}
172172
const GroupTestEvent({
173173
required this.group,
174-
required int time,
175-
}) : super(type: 'group', time: time);
174+
required super.time,
175+
}) : super(type: 'group');
176176

177177
/// {@macro group_test_event}
178178
factory GroupTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -192,8 +192,8 @@ class TestStartEvent extends TestEvent {
192192
/// {@macro test_start_event}
193193
const TestStartEvent({
194194
required this.test,
195-
required int time,
196-
}) : super(type: 'testStart', time: time);
195+
required super.time,
196+
}) : super(type: 'testStart');
197197

198198
/// {@macro test_start_event}
199199
factory TestStartEvent.fromJson(Map<String, dynamic> json) =>
@@ -216,8 +216,8 @@ class MessageTestEvent extends TestEvent {
216216
required this.testID,
217217
required this.messageType,
218218
required this.message,
219-
required int time,
220-
}) : super(type: 'print', time: time);
219+
required super.time,
220+
}) : super(type: 'print');
221221

222222
/// {@macro message_test_event}
223223
factory MessageTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -246,8 +246,8 @@ class ErrorTestEvent extends TestEvent {
246246
required this.error,
247247
required this.stackTrace,
248248
required this.isFailure,
249-
required int time,
250-
}) : super(type: 'error', time: time);
249+
required super.time,
250+
}) : super(type: 'error');
251251

252252
/// {@macro error_test_event}
253253
factory ErrorTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -290,8 +290,8 @@ class TestDoneEvent extends TestEvent {
290290
required this.result,
291291
required this.hidden,
292292
required this.skipped,
293-
required int time,
294-
}) : super(type: 'testDone', time: time);
293+
required super.time,
294+
}) : super(type: 'testDone');
295295

296296
/// {@macro test_done_event}
297297
factory TestDoneEvent.fromJson(Map<String, dynamic> json) =>
@@ -319,8 +319,8 @@ class DoneTestEvent extends TestEvent {
319319
/// {@macro done_test_event}
320320
const DoneTestEvent({
321321
required this.success,
322-
required int time,
323-
}) : super(type: 'done', time: time);
322+
required super.time,
323+
}) : super(type: 'done');
324324

325325
/// {@macro done_test_event}
326326
factory DoneTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -340,8 +340,8 @@ class DoneTestEvent extends TestEvent {
340340
@JsonSerializable()
341341
class ExitTestEvent extends TestEvent {
342342
/// {@macro test_exit_event}
343-
const ExitTestEvent({required int time, required this.exitCode})
344-
: super(type: 'exit', time: time);
343+
const ExitTestEvent({required super.time, required this.exitCode})
344+
: super(type: 'exit');
345345

346346
/// {@macro test_exit_event}
347347
factory ExitTestEvent.fromJson(Map<String, dynamic> json) =>
@@ -398,12 +398,12 @@ class TestGroup {
398398
required this.id,
399399
required this.name,
400400
required this.suiteID,
401-
this.parentID,
402401
required this.testCount,
402+
required this.metadata,
403+
this.parentID,
403404
this.line,
404405
this.column,
405406
this.url,
406-
required this.metadata,
407407
});
408408

409409
/// {@macro test_group}
@@ -470,13 +470,13 @@ class Test {
470470
required this.name,
471471
required this.suiteID,
472472
required this.groupIDs,
473+
required this.metadata,
473474
this.line,
474475
this.column,
475476
this.url,
476477
this.rootLine,
477478
this.rootColumn,
478479
this.rootUrl,
479-
required this.metadata,
480480
});
481481

482482
/// {@macro test}

lib/src/very_good_test_runner.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ Stream<TestEvent> _runTestProcess(
7373
Future<Process> Function() processRunner,
7474
) {
7575
final controller = StreamController<TestEvent>();
76-
late StreamSubscription testEventSubscription;
77-
late StreamSubscription errorSubscription;
76+
late StreamSubscription<dynamic> testEventSubscription;
77+
late StreamSubscription<dynamic> errorSubscription;
7878
late Future<Process> processFuture;
7979

80-
Future<void> _onListen() async {
80+
Future<void> onListen() async {
8181
final stopwatch = Stopwatch()..start();
8282
processFuture = processRunner();
8383
final process = await processFuture;
@@ -105,16 +105,16 @@ Stream<TestEvent> _runTestProcess(
105105
await controller.close();
106106
}
107107

108-
Future<void> _onCancel() async {
108+
Future<void> onCancel() async {
109109
await controller.close();
110110
(await processFuture).kill();
111111
await errorSubscription.cancel();
112112
await testEventSubscription.cancel();
113113
}
114114

115115
controller
116-
..onListen = _onListen
117-
..onCancel = _onCancel;
116+
..onListen = onListen
117+
..onCancel = onCancel;
118118

119119
return controller.stream;
120120
}

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ homepage: https://github.com/VeryGoodOpenSource/very_good_test_runner
44
version: 0.1.2
55

66
environment:
7-
sdk: ">=2.16.0 <3.0.0"
7+
sdk: ">=2.18.0 <3.0.0"
88

99
dependencies:
1010
json_annotation: ^4.4.0
1111
universal_io: ^2.0.0
1212

1313
dev_dependencies:
1414
build_runner: ^2.0.0
15-
build_verify: ^2.0.0
15+
build_verify: ^3.1.0
1616
json_serializable: ^6.0.0
1717
mocktail: ^0.3.0
1818
test: ^1.19.2
19-
very_good_analysis: ^2.4.0
19+
very_good_analysis: ^4.0.0

0 commit comments

Comments
 (0)