Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update to v6 release of package:lints
  • Loading branch information
parlough committed Oct 29, 2025
commit 7d3d3220391f154136f983f098ec9c21ffd53c77
1 change: 1 addition & 0 deletions _analysis_config/lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ linter:
- unnecessary_lambdas
- unnecessary_parenthesis
- unnecessary_statements
- use_null_aware_elements

# TODO(https://github.com/dart-lang/webdev/issues/2053): Enable commented-out rules with fixes.
dart_code_metrics:
Expand Down
2 changes: 1 addition & 1 deletion _analysis_config/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ environment:
sdk: ^3.10.0-0.0.dev

dependencies:
lints: ^5.0.0
lints: ^6.0.0
2 changes: 1 addition & 1 deletion dwds/debug_extension/tool/copy_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'package:build/build.dart';

/// Factory for the build script.
Builder copyBuilder(_) => _CopyBuilder();
Builder copyBuilder(BuilderOptions _) => _CopyBuilder();

class _CopyBuilder extends Builder {
@override
Expand Down
3 changes: 1 addition & 2 deletions dwds/lib/src/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ class DwdsEvent {

DwdsEvent.getVM() : this(DwdsEventKind.getVM, {});

DwdsEvent.resume(String? step)
: this(DwdsEventKind.resume, {if (step != null) 'step': step});
DwdsEvent.resume(String? step) : this(DwdsEventKind.resume, {'step': ?step});

DwdsEvent.getSourceReport() : this(DwdsEventKind.getSourceReport, {});

Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/readers/asset_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:package_config/package_config.dart';
abstract class AssetReader {
/// Base path of the application, for example, set up in the index file:
///
/// ```
/// ```html
/// <html>
/// <head>
/// <base href="/abc/">
Expand Down
4 changes: 2 additions & 2 deletions dwds/test/common/chrome_proxy_service_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ void runTests({
expect(
isolate.libraries,
containsAll([
_libRef('package:path/path.dart'),
_libRef(equals('package:path/path.dart')),
// TODO: library names change with kernel dart-lang/sdk#36736
_libRef(endsWith('main.dart')),
]),
Expand Down Expand Up @@ -2713,7 +2713,7 @@ void runTests({

final _isSuccess = isA<Success>();

TypeMatcher _libRef(uriMatcher) =>
TypeMatcher _libRef(Matcher uriMatcher) =>
isA<LibraryRef>().having((l) => l.uri, 'uri', uriMatcher);

void expectEventually(Matcher expectation) {}
2 changes: 1 addition & 1 deletion dwds/test/debugger_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void main() async {
skipLists = SkipLists(root);
debugger = await Debugger.create(
webkitDebugger,
(_, __) {},
(_, _) {},
locations,
skipLists,
root,
Expand Down
6 changes: 3 additions & 3 deletions dwds/test/fixtures/fakes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ class FakeWebkitDebugger implements WebkitDebugger {
ReloadConfiguration.none,
(_) async => {},
(_) async => {},
(_, __) async => null,
(MetadataProvider _, String __) async => '',
(MetadataProvider _, String __) async => '',
(_, _) async => null,
(MetadataProvider _, String _) async => '',
(MetadataProvider _, String _) async => '',
(String _) => '',
(MetadataProvider _) async => <String, ModuleInfo>{},
FakeAssetReader(),
Expand Down
4 changes: 2 additions & 2 deletions dwds/test/instances/common/test_inspector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Matcher matchPrimitiveInstance({
.having((e) => e.kind, 'kind', kind)
.having(_getValue, 'value', value);

Matcher matchPlainInstance({required libraryId, required String type}) =>
Matcher matchPlainInstance({required String libraryId, required String type}) =>
isA<Instance>()
.having((e) => e.kind, 'kind', InstanceKind.kPlainInstance)
.having(
Expand All @@ -321,7 +321,7 @@ Matcher matchPlainInstance({required libraryId, required String type}) =>
matchClassRef(name: type, libraryId: libraryId),
);

Matcher matchListInstance({required dynamic type}) => isA<Instance>()
Matcher matchListInstance({required String type}) => isA<Instance>()
.having((e) => e.kind, 'kind', InstanceKind.kList)
.having((e) => e.classRef, 'classRef', matchListClassRef(type));

Expand Down
4 changes: 2 additions & 2 deletions dwds/test/puppeteer/extension_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:dwds/data/extension_request.dart';
import 'package:dwds/src/servers/extension_backend.dart';
import 'package:dwds/src/utilities/server.dart';
import 'package:path/path.dart' as p;
import 'package:puppeteer/puppeteer.dart' hide Response;
import 'package:puppeteer/puppeteer.dart' hide Request, Response;
import 'package:shelf/shelf.dart';
import 'package:shelf_static/shelf_static.dart';
import 'package:test/test.dart';
Expand Down Expand Up @@ -1037,7 +1037,7 @@ Future<HttpServer> _fakeServer({
return server;
}

Response _fakeAuthHandler(request) {
Response _fakeAuthHandler(Request request) {
if (request.url.path == authenticationPath) {
return Response.ok(authenticationResponse);
}
Expand Down
2 changes: 1 addition & 1 deletion example/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'dart:html';
void main() {
print('Initial Print :)');

registerExtension('ext.print', (_, __) async {
registerExtension('ext.print', (_, _) async {
print('Hello World !! :)');
return ServiceExtensionResponse.result(json.encode({'success': true}));
});
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_test/example/append_body/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void main() {
log(logMessage);
previousLog = logMessage;

registerExtension('ext.flutter.disassemble', (_, __) async {
registerExtension('ext.flutter.disassemble', (_, _) async {
log('start disassemble');
await Future.delayed(const Duration(seconds: 1));
log('end disassemble');
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_test/example/hello_world/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void main() async {
// recognize this as an available extension.
registerExtension(
'ext.hello_world.existing',
(_, __) => Future.value(ServiceExtensionResponse.error(0, '')),
(_, _) => Future.value(ServiceExtensionResponse.error(0, '')),
);

window.console.debug('Page Ready');
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_test_package/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void main() async {
}

void registerUserExtension(int id) async {
registerExtension('ext.extension$id', (_, __) async {
registerExtension('ext.extension$id', (_, _) async {
print('Hello World from extension$id');
return ServiceExtensionResponse.result(json.encode({'success': true}));
});
Expand Down
2 changes: 1 addition & 1 deletion fixtures/_webdev_smoke/web/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'dart:html';
void main() {
print('Initial Print');

registerExtension('ext.print', (_, __) async {
registerExtension('ext.print', (_, _) async {
print('Hello World');
return ServiceExtensionResponse.result(json.encode({'success': true}));
});
Expand Down
6 changes: 2 additions & 4 deletions webdev/test/tls_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ void main() {
emitsThrough(contains('Built with build_runner')),
);

final client = HttpClient()
..badCertificateCallback = (_, __, ___) => true;
final client = HttpClient()..badCertificateCallback = (_, _, _) => true;
try {
final request = await client.getUrl(
Uri.parse('https://localhost:$port'),
Expand Down Expand Up @@ -112,8 +111,7 @@ void main() {
'No non-loopback IPv4 address available, skipping hostname test.',
);
} else {
final client = HttpClient()
..badCertificateCallback = (_, __, ___) => true;
final client = HttpClient()..badCertificateCallback = (_, _, _) => true;
try {
final request = await client.getUrl(
Uri.parse('https://${nonLoopback.address}:$port'),
Expand Down
Loading