File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ linter:
17
17
- always_declare_return_types
18
18
- annotate_overrides
19
19
- avoid_init_to_null
20
+ - avoid_types_as_parameter_names
20
21
- directives_ordering
21
22
- no_adjacent_strings_in_list
22
23
- package_api_docs
Original file line number Diff line number Diff line change @@ -388,7 +388,7 @@ class Dartdoc extends PackageBuilder {
388
388
Uri uri;
389
389
try {
390
390
uri = Uri .parse (href);
391
- } catch ( FormatError ) {
391
+ } on FormatException {
392
392
// ignore
393
393
}
394
394
Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ class PackageWithoutSdkResolver extends UriResolver {
458
458
Uri resolved;
459
459
try {
460
460
resolved = _sdkResolver.restoreAbsolute (source);
461
- } catch ( ArgumentError ) {
461
+ } on ArgumentError {
462
462
// SDK resolvers really don't like being thrown package paths.
463
463
}
464
464
if (resolved == null ) {
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ dev_dependencies:
40
40
io : ^0.3.0
41
41
http : ^0.12.0
42
42
meta : ^1.0.0
43
- pedantic : ^1.8 .0
43
+ pedantic : ^1.9 .0
44
44
test : ^1.3.0
45
45
46
46
executables :
Original file line number Diff line number Diff line change @@ -308,8 +308,11 @@ class SubprocessLauncher {
308
308
Map result;
309
309
try {
310
310
result = json.decoder.convert (line);
311
- } catch (FormatException ) {
312
- // ignore
311
+ } on FormatException {
312
+ // Assume invalid JSON is actually a line of normal text.
313
+ } on TypeError {
314
+ // The convert function returns a String if there is no JSON in the
315
+ // line. Just ignore it and leave result null.
313
316
}
314
317
if (result != null ) {
315
318
if (jsonObjects == null ) {
You can’t perform that action at this time.
0 commit comments