Skip to content

Commit

Permalink
chore: update dependencies and linter rules
Browse files Browse the repository at this point in the history
  • Loading branch information
lsaudon committed Oct 15, 2024
1 parent b88ecc8 commit 0455c32
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
8 changes: 8 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ linter:
# - always_specify_types
- always_use_package_imports
- annotate_overrides
- annotate_redeclares
- avoid_annotating_with_dynamic
- avoid_bool_literals_in_conditional_expressions
- avoid_catches_without_on_clauses
Expand Down Expand Up @@ -76,6 +77,7 @@ linter:
- directives_ordering
# - discarded_futures
- do_not_use_environment
- document_ignores
- empty_catches
- empty_constructor_bodies
- empty_statements
Expand All @@ -88,6 +90,7 @@ linter:
- implicit_call_tearoffs
- implicit_reopen
- invalid_case_patterns
- invalid_runtime_check_with_js_interop_types
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_annotations
Expand All @@ -97,6 +100,7 @@ linter:
- lines_longer_than_80_chars
- literal_only_boolean_expressions
- matching_super_parameters
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
Expand All @@ -106,6 +110,8 @@ linter:
- no_literal_bool_comparisons
- no_logic_in_create_state
- no_runtimeType_toString
- no_self_assignments
- no_wildcard_variable_uses
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
Expand Down Expand Up @@ -176,6 +182,7 @@ linter:
- type_init_formals
- type_literal_in_constant_pattern
- unawaited_futures
- unintended_html_in_doc_comment
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_breaks
Expand All @@ -186,6 +193,7 @@ linter:
- unnecessary_lambdas
- unnecessary_late
- unnecessary_library_directive
- unnecessary_library_name
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_aware_operator_on_extension_on_nullable
Expand Down
11 changes: 1 addition & 10 deletions lib/pubspec_version_cli.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
/// pubspec_version_cli, Command-Line Interface to change the version in pubspec
///
/// ```sh
/// # activate pubspec_version_cli
/// dart pub global activate pubspec_version_cli
///
/// # see usage
/// pubspec_version --help
/// ```
library pubspec_version_cli;

2 changes: 1 addition & 1 deletion lib/src/command_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const description = 'Command-Line Interface to change the version in pubspec';
/// {@template pubspec_version_cli_command_runner}
/// A [CommandRunner] for the CLI.
///
/// ```
/// ```bash
/// $ pubspec_version --version
/// ```
/// {@endtemplate}
Expand Down
24 changes: 12 additions & 12 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
args: ^2.4.2
cli_completion: ">=0.4.0 <0.6.0"
file: ^7.0.0
mason_logger: ">=0.2.10 <0.4.0"
path: ^1.8.3
pub_updater: ">=0.4.0 <0.6.0"
yaml: ^3.1.2
args: 2.6.0
cli_completion: 0.5.1
file: 7.0.1
mason_logger: 0.3.1
path: 1.9.0
pub_updater: 0.5.0
yaml: 3.1.2

dev_dependencies:
build_runner: ^2.4.6
build_verify: ^3.1.0
build_version: ^2.1.1
mocktail: ^1.0.1
test: ^1.24.7
build_runner: 2.4.13
build_verify: 3.1.0
build_version: 2.1.1
mocktail: 1.0.4
test: 1.25.8

executables:
pubspec_version:
4 changes: 2 additions & 2 deletions test/src/command_runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ void main() {

final progress = _MockProgress();
final progressLogs = <String>[];
when(() => progress.complete(any())).thenAnswer((final _) {
final message = _.positionalArguments.elementAt(0) as String?;
when(() => progress.complete(any())).thenAnswer((final invocation) {
final message = invocation.positionalArguments.elementAt(0) as String?;
if (message != null) {
progressLogs.add(message);
}
Expand Down
4 changes: 2 additions & 2 deletions test/src/commands/update_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ void main() {
currentVersion: any(named: 'currentVersion'),
),
).thenAnswer((final _) async => true);
when(() => progress.complete(any())).thenAnswer((final _) {
final message = _.positionalArguments.elementAt(0) as String?;
when(() => progress.complete(any())).thenAnswer((final invocation) {
final message = invocation.positionalArguments.elementAt(0) as String?;
if (message != null) {
progressLogs.add(message);
}
Expand Down

0 comments on commit 0455c32

Please sign in to comment.