Skip to content

Commit 11c37f4

Browse files
committed
Revert "analysis updates and fixes"
This reverts commit 2acece7.
1 parent 589bcb0 commit 11c37f4

24 files changed

+43
-43
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:very_good_analysis/analysis_options.7.0.0.yaml
1+
include: package:very_good_analysis/analysis_options.5.1.0.yaml
22
analyzer:
33
exclude:
44
- "**/version.dart"

lib/src/cli/dart_cli.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Dart {
99
try {
1010
await _Cmd.run('dart', ['--version'], logger: logger);
1111
return true;
12-
} on Exception catch (_) {
12+
} catch (_) {
1313
return false;
1414
}
1515
}

lib/src/cli/flutter_cli.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class Flutter {
124124
try {
125125
await _Cmd.run('flutter', ['--version'], logger: logger);
126126
return true;
127-
} on Exception catch (_) {
127+
} catch (_) {
128128
return false;
129129
}
130130
}

lib/src/cli/git_cli.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Git {
3131
['ls-remote', '$remote', '--exit-code'],
3232
logger: logger,
3333
);
34-
} on Exception catch (_) {
34+
} catch (_) {
3535
throw UnreachableGitDependency(remote: remote);
3636
}
3737
}

lib/src/command_runner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ ${lightYellow.wrap('Changelog:')} ${lightCyan.wrap('https://github.com/verygoodo
146146
Run ${lightCyan.wrap('very_good update')} to update''',
147147
);
148148
}
149-
} on Exception catch (_) {}
149+
} catch (_) {}
150150
}
151151

152152
void _showThankYou() {

lib/src/commands/create/commands/create_subcommand.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ abstract class CreateSubCommand extends Command<int> {
178178
'''Building generator from brick: ${brick.name} ${brick.location.version}''',
179179
);
180180
return await _generatorFromBrick(brick);
181-
} on Exception catch (error) {
181+
} catch (error) {
182182
logger.detail('Building generator from brick failed: $error');
183183
}
184184
logger.detail(

lib/src/commands/packages/commands/check/commands/licenses.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class PackagesCheckLicensesCommand extends Command<int> {
269269
try {
270270
detectorResult =
271271
await detectLicense(licenseFileContent, _defaultDetectionThreshold);
272-
} on Exception catch (e) {
272+
} catch (e) {
273273
final errorMessage =
274274
'''[$dependencyName] Failed to detect license from $packagePath: $e''';
275275
if (!ignoreFailures) {
@@ -330,7 +330,7 @@ PubspecLock? _tryParsePubspecLock(File pubspecLockFile) {
330330
final content = pubspecLockFile.readAsStringSync();
331331
try {
332332
return PubspecLock.fromString(content);
333-
} on Exception catch (_) {}
333+
} catch (_) {}
334334
}
335335

336336
return null;
@@ -348,7 +348,7 @@ Future<package_config.PackageConfig?> _tryFindPackageConfig(
348348
final findPackageConfig =
349349
findPackageConfigOverride ?? package_config.findPackageConfig;
350350
return await findPackageConfig(directory);
351-
} on Exception {
351+
} catch (error) {
352352
return null;
353353
}
354354
}

lib/src/commands/packages/commands/get.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class PackagesGetCommand extends Command<int> {
6161
} on PubspecNotFound catch (_) {
6262
_logger.err('Could not find a pubspec.yaml in $targetPath');
6363
return ExitCode.noInput.code;
64-
} on Exception catch (error) {
64+
} catch (error) {
6565
_logger.err('$error');
6666
return ExitCode.unavailable.code;
6767
}

lib/src/commands/test/test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ This command should be run from the root of your Flutter project.''',
229229
'''Expected coverage >= ${minCoverage.toStringAsFixed(decimalPlaces)}% but actual is ${e.coverage.toStringAsFixed(decimalPlaces)}%.''',
230230
);
231231
return ExitCode.unavailable.code;
232-
} on Exception catch (error) {
232+
} catch (error) {
233233
_logger.err('$error');
234234
return ExitCode.unavailable.code;
235235
}

lib/src/commands/update.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class UpdateCommand extends Command<int> {
3535
late final String latestVersion;
3636
try {
3737
latestVersion = await _pubUpdater.getLatestVersion(packageName);
38-
} on Exception catch (error) {
38+
} catch (error) {
3939
updateCheckProgress.fail();
4040
_logger.err('$error');
4141
return ExitCode.software.code;
@@ -57,7 +57,7 @@ class UpdateCommand extends Command<int> {
5757
packageName: packageName,
5858
versionConstraint: latestVersion,
5959
);
60-
} on Exception catch (error) {
60+
} catch (error) {
6161
updateProgress.fail();
6262
_logger.err('$error');
6363
return ExitCode.software.code;

0 commit comments

Comments
 (0)