This repository was archived by the owner on Nov 20, 2024. It is now read-only.
File tree 3 files changed +8
-5
lines changed 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ linter:
39
39
# - close_sinks # https://github.com/dart-lang/linter/issues/268
40
40
- comment_references
41
41
- directives_ordering
42
+ - discarded_futures
42
43
- invariant_booleans
43
44
- join_return_with_assignment
44
45
# - lines_longer_than_80_chars # under review (see #1068)
Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ import 'package:path/path.dart' as path;
20
20
21
21
import 'rules/visit_registered_nodes.dart' ;
22
22
23
- void main () {
23
+ Future < void > main () async {
24
24
var rules =
25
25
path.normalize (io.File (path.join ('lib' , 'src' , 'rules' )).absolute.path);
26
- Driver ([VisitRegisteredNodes ()]).analyze ([rules]);
26
+ await Driver ([VisitRegisteredNodes ()]).analyze ([rules]);
27
27
}
28
28
29
29
class Driver {
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ import 'doc.dart';
10
10
import 'rule.dart' ;
11
11
12
12
@Deprecated ('To be removed' )
13
- void main (List <String > args) => grind (args);
13
+ Future <void > main (List <String > args) async {
14
+ await grind (args);
15
+ }
14
16
15
17
Iterable <String > get sourcePaths => sources.map ((dir) => dir.path);
16
18
@@ -26,10 +28,10 @@ Iterable<FileSystemEntity> get sources => existingSourceDirs.expand((dir) {
26
28
});
27
29
28
30
@Task ('Generate lint rule docs.' )
29
- void docs () {
31
+ Future < void > docs () async {
30
32
var args = context.invocation.arguments;
31
33
var dir = args.getOption ('dir' );
32
- generateDocs (dir);
34
+ await generateDocs (dir);
33
35
}
34
36
35
37
@Task ('Format linter sources.' )
You can’t perform that action at this time.
0 commit comments