diff --git a/bricks/create_dart_frog/hooks/analysis_options.yaml b/bricks/create_dart_frog/hooks/analysis_options.yaml index bb7209144..c2f4cbbca 100644 --- a/bricks/create_dart_frog/hooks/analysis_options.yaml +++ b/bricks/create_dart_frog/hooks/analysis_options.yaml @@ -1 +1 @@ -include: package:very_good_analysis/analysis_options.6.0.0.yaml +include: package:very_good_analysis/analysis_options.7.0.0.yaml diff --git a/bricks/create_dart_frog/hooks/pubspec.yaml b/bricks/create_dart_frog/hooks/pubspec.yaml index 6097b6958..b8d38a39e 100644 --- a/bricks/create_dart_frog/hooks/pubspec.yaml +++ b/bricks/create_dart_frog/hooks/pubspec.yaml @@ -10,4 +10,4 @@ dependencies: dev_dependencies: mocktail: ^1.0.0 test: ^1.25.0 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/bricks/dart_frog_dev_server/hooks/analysis_options.yaml b/bricks/dart_frog_dev_server/hooks/analysis_options.yaml index bb7209144..c2f4cbbca 100644 --- a/bricks/dart_frog_dev_server/hooks/analysis_options.yaml +++ b/bricks/dart_frog_dev_server/hooks/analysis_options.yaml @@ -1 +1 @@ -include: package:very_good_analysis/analysis_options.6.0.0.yaml +include: package:very_good_analysis/analysis_options.7.0.0.yaml diff --git a/bricks/dart_frog_dev_server/hooks/pre_gen.dart b/bricks/dart_frog_dev_server/hooks/pre_gen.dart index 67b82d947..4b637d9b4 100644 --- a/bricks/dart_frog_dev_server/hooks/pre_gen.dart +++ b/bricks/dart_frog_dev_server/hooks/pre_gen.dart @@ -23,7 +23,7 @@ Future preGen( final RouteConfiguration configuration; try { configuration = buildConfiguration(io.Directory.current); - } catch (error) { + } on Exception catch (error) { context.logger.err('$error'); return exit(1); } diff --git a/bricks/dart_frog_dev_server/hooks/pubspec.yaml b/bricks/dart_frog_dev_server/hooks/pubspec.yaml index 3eb2fbeea..d47f4f986 100644 --- a/bricks/dart_frog_dev_server/hooks/pubspec.yaml +++ b/bricks/dart_frog_dev_server/hooks/pubspec.yaml @@ -13,4 +13,4 @@ dev_dependencies: mocktail: ^1.0.0 path: ^1.8.2 test: ^1.25.0 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/bricks/dart_frog_prod_server/hooks/analysis_options.yaml b/bricks/dart_frog_prod_server/hooks/analysis_options.yaml index 3a6b5d4c4..c59316b7a 100644 --- a/bricks/dart_frog_prod_server/hooks/analysis_options.yaml +++ b/bricks/dart_frog_prod_server/hooks/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:very_good_analysis/analysis_options.6.0.0.yaml +include: package:very_good_analysis/analysis_options.7.0.0.yaml linter: rules: public_member_api_docs: false diff --git a/bricks/dart_frog_prod_server/hooks/lib/src/create_bundle.dart b/bricks/dart_frog_prod_server/hooks/lib/src/create_bundle.dart index 69d703367..72d2f8e4c 100644 --- a/bricks/dart_frog_prod_server/hooks/lib/src/create_bundle.dart +++ b/bricks/dart_frog_prod_server/hooks/lib/src/create_bundle.dart @@ -29,7 +29,7 @@ Future createBundle({ '${tempDirectory.path}${path.separator}', ); bundlingProgress.complete(); - } catch (error) { + } on Exception catch (error) { bundlingProgress.fail(); context.logger.err('$error'); return exit(1); diff --git a/bricks/dart_frog_prod_server/hooks/lib/src/pubspec_lock/pubspec_lock.dart b/bricks/dart_frog_prod_server/hooks/lib/src/pubspec_lock/pubspec_lock.dart index 8e5872bbd..f3d832310 100644 --- a/bricks/dart_frog_prod_server/hooks/lib/src/pubspec_lock/pubspec_lock.dart +++ b/bricks/dart_frog_prod_server/hooks/lib/src/pubspec_lock/pubspec_lock.dart @@ -3,7 +3,7 @@ /// This is used by the bundling process to check for those dependencies that /// are external path dependencies. Hence, it is not a complete parser, it only /// parses the information that is needed for the bundling process. -library pubspec_lock; +library; import 'dart:collection'; @@ -35,7 +35,7 @@ class PubspecLock { late final YamlMap yaml; try { yaml = loadYaml(content) as YamlMap; - } catch (_) { + } on Exception catch (_) { throw const PubspecLockParseException(); } @@ -53,7 +53,7 @@ class PubspecLock { data: entry.value as YamlMap, ); parsedPackages.add(package); - } catch (_) { + } on Exception catch (_) { // Ignore those packages that for some reason cannot be parsed. } } diff --git a/bricks/dart_frog_prod_server/hooks/pre_gen.dart b/bricks/dart_frog_prod_server/hooks/pre_gen.dart index 885184151..4e8caf88f 100644 --- a/bricks/dart_frog_prod_server/hooks/pre_gen.dart +++ b/bricks/dart_frog_prod_server/hooks/pre_gen.dart @@ -48,7 +48,7 @@ Future preGen( final RouteConfiguration configuration; try { configuration = buildConfiguration(projectDirectory); - } catch (error) { + } on Exception catch (error) { context.logger.err('$error'); return exit(1); } diff --git a/bricks/dart_frog_prod_server/hooks/pubspec.yaml b/bricks/dart_frog_prod_server/hooks/pubspec.yaml index 6640f4b81..d67881be3 100644 --- a/bricks/dart_frog_prod_server/hooks/pubspec.yaml +++ b/bricks/dart_frog_prod_server/hooks/pubspec.yaml @@ -15,4 +15,4 @@ dependencies: dev_dependencies: mocktail: ^1.0.0 test: ^1.25.0 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/bricks/dart_frog_prod_server/hooks/test/pubspec_locks.dart b/bricks/dart_frog_prod_server/hooks/test/pubspec_locks.dart index db375c594..b35583e41 100644 --- a/bricks/dart_frog_prod_server/hooks/test/pubspec_locks.dart +++ b/bricks/dart_frog_prod_server/hooks/test/pubspec_locks.dart @@ -1,5 +1,5 @@ /// Collection of `pubspec.lock` files used as fixtures during testing. -library pubspec_locks; +library; /// An artificially crafted `pubspec.lock` file with: /// diff --git a/bricks/dart_frog_prod_server/hooks/test/src/pubspec_lock/pubspec_lock_test.dart b/bricks/dart_frog_prod_server/hooks/test/src/pubspec_lock/pubspec_lock_test.dart index f5e59360a..00e002b99 100644 --- a/bricks/dart_frog_prod_server/hooks/test/src/pubspec_lock/pubspec_lock_test.dart +++ b/bricks/dart_frog_prod_server/hooks/test/src/pubspec_lock/pubspec_lock_test.dart @@ -1,3 +1,4 @@ +// Not needed for test files // ignore_for_file: prefer_const_constructors import 'package:dart_frog_prod_server_hooks/src/pubspec_lock/pubspec_lock.dart';