From 288caa709d79f39f37fdb7f0ac599e6d32aafa2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:16:23 +0000 Subject: [PATCH 1/4] chore(deps): bump very_good_analysis from 6.0.0 to 7.0.0 Bumps [very_good_analysis](https://github.com/VeryGoodOpenSource/very_good_analysis) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/VeryGoodOpenSource/very_good_analysis/releases) - [Changelog](https://github.com/VeryGoodOpenSource/very_good_analysis/blob/main/CHANGELOG.md) - [Commits](https://github.com/VeryGoodOpenSource/very_good_analysis/compare/v6.0.0...v7.0.0) --- updated-dependencies: - dependency-name: very_good_analysis dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 48142e1..a2fde26 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: ">=6.0.0 <8.0.0" From 2ab0e714af9c1cf34a1d5cc8a2504c60a2914d6a Mon Sep 17 00:00:00 2001 From: Tom Arra Date: Thu, 19 Dec 2024 10:02:15 -0600 Subject: [PATCH 2/4] update analysis files across the repo --- analysis_options.yaml | 2 +- example/analysis_options.yaml | 2 +- example/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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/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/pubspec.yaml b/pubspec.yaml index a2fde26..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 <8.0.0" + very_good_analysis: ^7.0.0 From df62895d66188752d37c615c587ea4cdeaa98d1a Mon Sep 17 00:00:00 2001 From: Tom Arra Date: Thu, 19 Dec 2024 14:55:00 -0600 Subject: [PATCH 3/4] some analysis fixes --- example/lib/example.dart | 2 +- example/test/integration/completion_integration_test.dart | 2 +- lib/cli_completion.dart | 2 +- lib/installer.dart | 2 +- lib/parser.dart | 2 +- lib/src/parser/arg_parser_extension.dart | 2 +- test/src/installer/script_configuration_entry_test.dart | 1 + 7 files changed, 7 insertions(+), 6 deletions(-) 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/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/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'; From ac85ea6c2957eca0f739bee0cf10cbebf0edad99 Mon Sep 17 00:00:00 2001 From: Tom Arra Date: Fri, 20 Dec 2024 10:20:17 -0600 Subject: [PATCH 4/4] fixing analysis errors --- .../commands/handle_completion_command_test.dart | 1 + .../commands/install_completion_files_command_test.dart | 1 + .../commands/uninstall_completion_files_command_test.dart | 1 + test/src/command_runner/completion_command_runner_test.dart | 2 ++ test/src/installer/completion_configuration_test.dart | 1 + test/src/installer/completion_installation_test.dart | 5 +++++ 6 files changed, 11 insertions(+) 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]