diff --git a/analysis_options.yaml b/analysis_options.yaml index bb72091..c2f4cbb 100644 --- a/analysis_options.yaml +++ b/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/example/analysis_options.yaml b/example/analysis_options.yaml index 3a6b5d4..c59316b 100644 --- a/example/analysis_options.yaml +++ b/example/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/example/lib/example.dart b/example/lib/example.dart index 71cca2d..5542f3a 100644 --- a/example/lib/example.dart +++ b/example/lib/example.dart @@ -7,4 +7,4 @@ /// # see usage /// example_cli --help /// ``` -library example; +library; diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 5c0c641..0e10eb3 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: dev_dependencies: mocktail: ^1.0.4 test: ^1.25.8 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 executables: example_cli: diff --git a/example/test/integration/completion_integration_test.dart b/example/test/integration/completion_integration_test.dart index cf57796..41e8df3 100644 --- a/example/test/integration/completion_integration_test.dart +++ b/example/test/integration/completion_integration_test.dart @@ -1,5 +1,5 @@ @Tags(['integration']) -library integration_tests; +library; import 'package:test/test.dart'; diff --git a/lib/cli_completion.dart b/lib/cli_completion.dart index 6e04170..13fa843 100644 --- a/lib/cli_completion.dart +++ b/lib/cli_completion.dart @@ -1,6 +1,6 @@ /// Contains the completion command runner based elements to add completion to /// dart command line applications. -library cli_completion; +library; export 'src/command_runner/commands/commands.dart'; export 'src/command_runner/completion_command_runner.dart'; diff --git a/lib/installer.dart b/lib/installer.dart index d34b03a..b0824fd 100644 --- a/lib/installer.dart +++ b/lib/installer.dart @@ -1,6 +1,6 @@ /// Contains the functions related to the installation process /// {@canonicalFor system_shell.SystemShell} -library installer; +library; export 'src/installer/installer.dart'; export 'src/system_shell.dart'; diff --git a/lib/parser.dart b/lib/parser.dart index 420fd41..82b7712 100644 --- a/lib/parser.dart +++ b/lib/parser.dart @@ -1,6 +1,6 @@ /// Contains the classes and functions related to the creation of suggestions /// for the completion of commands. -library parser; +library; export 'src/parser/completion_level.dart'; export 'src/parser/completion_result.dart'; diff --git a/lib/src/parser/arg_parser_extension.dart b/lib/src/parser/arg_parser_extension.dart index 8d0449b..57f2962 100644 --- a/lib/src/parser/arg_parser_extension.dart +++ b/lib/src/parser/arg_parser_extension.dart @@ -23,7 +23,7 @@ extension ArgParserExtension on ArgParser { while (currentArgs.isNotEmpty) { try { return loosenOptionsGramamar.parse(currentArgs); - } catch (_) { + } on Exception catch (_) { currentArgs = currentArgs.take(currentArgs.length - 1).toList(); } } diff --git a/pubspec.yaml b/pubspec.yaml index 48142e1..6c14e71 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,4 +21,4 @@ dependencies: dev_dependencies: mocktail: ^1.0.4 test: ^1.25.8 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/test/src/command_runner/commands/handle_completion_command_test.dart b/test/src/command_runner/commands/handle_completion_command_test.dart index 77b6d87..5d9c3e6 100644 --- a/test/src/command_runner/commands/handle_completion_command_test.dart +++ b/test/src/command_runner/commands/handle_completion_command_test.dart @@ -24,6 +24,7 @@ class _TestCompletionCommandRunner extends CompletionCommandRunner { String get executableName => 'test_cli'; @override + // Override acceptable for test files // ignore: overridden_fields final Logger completionLogger = MockLogger(); } diff --git a/test/src/command_runner/commands/install_completion_files_command_test.dart b/test/src/command_runner/commands/install_completion_files_command_test.dart index d2f1346..ff58d91 100644 --- a/test/src/command_runner/commands/install_completion_files_command_test.dart +++ b/test/src/command_runner/commands/install_completion_files_command_test.dart @@ -13,6 +13,7 @@ class _TestCompletionCommandRunner extends CompletionCommandRunner { _TestCompletionCommandRunner() : super('test', 'Test command runner'); @override + // Override acceptable for test files // ignore: overridden_fields final Logger completionInstallationLogger = _MockLogger(); diff --git a/test/src/command_runner/commands/uninstall_completion_files_command_test.dart b/test/src/command_runner/commands/uninstall_completion_files_command_test.dart index f1309f9..f9cfee3 100644 --- a/test/src/command_runner/commands/uninstall_completion_files_command_test.dart +++ b/test/src/command_runner/commands/uninstall_completion_files_command_test.dart @@ -13,6 +13,7 @@ class _TestCompletionCommandRunner extends CompletionCommandRunner { _TestCompletionCommandRunner() : super('test', 'Test command runner'); @override + // Override acceptable for test files // ignore: overridden_fields final Logger completionInstallationLogger = _MockLogger(); diff --git a/test/src/command_runner/completion_command_runner_test.dart b/test/src/command_runner/completion_command_runner_test.dart index 7e6e758..cec6280 100644 --- a/test/src/command_runner/completion_command_runner_test.dart +++ b/test/src/command_runner/completion_command_runner_test.dart @@ -18,10 +18,12 @@ class _TestCompletionCommandRunner extends CompletionCommandRunner { bool enableAutoInstall = true; @override + // Override acceptable for test files // ignore: overridden_fields final Logger completionLogger = MockLogger(); @override + // Override acceptable for test files // ignore: overridden_fields final Logger completionInstallationLogger = MockLogger(); diff --git a/test/src/installer/completion_configuration_test.dart b/test/src/installer/completion_configuration_test.dart index d9e9371..a8c954e 100644 --- a/test/src/installer/completion_configuration_test.dart +++ b/test/src/installer/completion_configuration_test.dart @@ -1,3 +1,4 @@ +// Not required for test files // ignore_for_file: prefer_const_constructors import 'dart:collection'; diff --git a/test/src/installer/completion_installation_test.dart b/test/src/installer/completion_installation_test.dart index 0cfff6d..a720a40 100644 --- a/test/src/installer/completion_installation_test.dart +++ b/test/src/installer/completion_installation_test.dart @@ -224,6 +224,7 @@ void main() { expect(configFile.existsSync(), true); + // Different format needed for matching cli output // ignore: leading_newlines_in_multiline_strings expect(configFile.readAsStringSync(), ''' \n## [very_good] @@ -285,6 +286,7 @@ void main() { installation.writeToShellConfigFile('very_good'); + // Different format needed for matching cli output // ignore: leading_newlines_in_multiline_strings expect(rcFile.readAsStringSync(), ''' \n## [Completion] @@ -432,6 +434,7 @@ void main() { // rc fle includes one reference to the global config + // Different format needed for matching cli output // ignore: leading_newlines_in_multiline_strings expect(rcFile.readAsStringSync(), ''' \n## [Completion] @@ -446,6 +449,7 @@ void main() { path.join(configDir.path, 'zsh-config.zsh'), ); + // Different format needed for matching cli output // ignore: leading_newlines_in_multiline_strings expect(globalConfig.readAsStringSync(), ''' \n## [very_good] @@ -486,6 +490,7 @@ void main() { ..install('very_good') ..install('not_good'); + // Different format needed for matching cli output // ignore: leading_newlines_in_multiline_strings expect(bashProfile.readAsStringSync(), ''' \n## [Completion] diff --git a/test/src/installer/script_configuration_entry_test.dart b/test/src/installer/script_configuration_entry_test.dart index 6a29b32..5cf6226 100644 --- a/test/src/installer/script_configuration_entry_test.dart +++ b/test/src/installer/script_configuration_entry_test.dart @@ -1,3 +1,4 @@ +// Not needed for test files // ignore_for_file: prefer_const_constructors import 'dart:io';