Skip to content

Commit

Permalink
Update latest lints and cleanup (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Dec 5, 2023
1 parent 1f2f6de commit 34d150c
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 20 deletions.
5 changes: 0 additions & 5 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ linter:
- cancel_subscriptions
- cascade_invocations
- close_sinks
- comment_references
- join_return_with_assignment
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_runtimeType_toString
- one_member_abstracts
- package_api_docs
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
Expand All @@ -45,12 +43,9 @@ linter:
- prefer_foreach
- prefer_int_literals
- prefer_mixin
- prefer_relative_imports
- require_trailing_commas
- test_types_in_equals
- unnecessary_await_in_return
- unnecessary_breaks
- use_setters_to_change_properties
- use_string_buffers
- use_super_parameters
- use_to_and_as_if_applicable
2 changes: 1 addition & 1 deletion build_cli/lib/src/to_share.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:analyzer/src/dart/element/inheritance_manager3.dart'
show InheritanceManager3;
import 'package:source_gen/source_gen.dart';

Never throwBugFound<T>(FieldElement element) => throwUnsupported(
Never throwBugFound(FieldElement element) => throwUnsupported(
element,
"You've hit a bug in build_cli!",
todo: 'Please rerun your build with --verbose and file as issue '
Expand Down
2 changes: 1 addition & 1 deletion build_cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dev_dependencies:
args: ^2.0.0
build_runner: ^2.0.0
build_verify: ^3.0.0
dart_flutter_team_lints: ^1.0.0
dart_flutter_team_lints: ^2.0.0
io: ^1.0.0
path: ^1.0.0
source_gen_test: ^1.0.0
Expand Down
3 changes: 2 additions & 1 deletion build_cli/test/command_runner_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import 'src/command_runner_example.dart';

void main() {
test('use with CommandRunner', () async {
final runner = CommandRunner('my_app', '')..addCommand(CommitCommand());
final runner = CommandRunner<void>('my_app', '')
..addCommand(CommitCommand());
await runner.run(['commit', '--all']);
expect(CommitCommand.debugOptionsWhenRun?.all, isTrue);
});
Expand Down
8 changes: 3 additions & 5 deletions build_cli/test/peanut_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ void main() {
test('`${item.value.join(' ')}`', () {
expect(
() => parsePeanutOptions(item.value),
throwsA((error) {
expect(error, isFormatException);
expect((error as FormatException).message, item.key);
return true;
}),
throwsA(
isFormatException.having((e) => e.message, 'message', item.key),
),
);
});
}
Expand Down
10 changes: 4 additions & 6 deletions build_cli/test/pubviz_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void main() {
final options = parsePubvizOptions([]);

expect(options.secret, isNull);
expect(options.ignorePackages, []);
expect(options.ignorePackages, <void>[]);
expect(options.productionPort, 8080);
expect(options.numValue, 3.14);
expect(options.doubleValue, 3000.0);
Expand Down Expand Up @@ -40,11 +40,9 @@ void main() {
test('`${item.value.join(' ')}`', () {
expect(
() => parsePubvizOptions(item.value),
throwsA((error) {
expect(error, isFormatException);
expect((error as FormatException).message, item.key);
return true;
}),
throwsA(
isFormatException.having((e) => e.message, 'message', item.key),
),
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion build_cli_annotations/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ environment:
dependencies:
# Limit version range on args – it's exported
args: '>=2.0.0 <3.0.0'
dart_flutter_team_lints: ^1.0.0
dart_flutter_team_lints: ^2.0.0
meta: ^1.7.0

0 comments on commit 34d150c

Please sign in to comment.