update lint list + enable unnecessary_string_interpolations (#50593)
This commit is contained in:
parent
b34046903b
commit
0bd45bc222
@ -69,6 +69,7 @@ linter:
|
|||||||
# - avoid_positional_boolean_parameters # not yet tested
|
# - avoid_positional_boolean_parameters # not yet tested
|
||||||
# - avoid_print # not yet tested
|
# - avoid_print # not yet tested
|
||||||
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
|
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
|
||||||
|
# - avoid_redundant_argument_values # not yet tested
|
||||||
- avoid_relative_lib_imports
|
- avoid_relative_lib_imports
|
||||||
- avoid_renaming_method_parameters
|
- avoid_renaming_method_parameters
|
||||||
- avoid_return_types_on_setters
|
- avoid_return_types_on_setters
|
||||||
@ -113,9 +114,11 @@ linter:
|
|||||||
# - lines_longer_than_80_chars # not yet tested
|
# - lines_longer_than_80_chars # not yet tested
|
||||||
- list_remove_unrelated_type
|
- list_remove_unrelated_type
|
||||||
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
|
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
|
||||||
|
# - missing_whitespace_between_adjacent_strings # not yet tested
|
||||||
- no_adjacent_strings_in_list
|
- no_adjacent_strings_in_list
|
||||||
- no_duplicate_case_values
|
- no_duplicate_case_values
|
||||||
# - no_logic_in_create_state # not yet tested
|
# - no_logic_in_create_state # not yet tested
|
||||||
|
# - no_runtimeType_toString # not yet tested
|
||||||
- non_constant_identifier_names
|
- non_constant_identifier_names
|
||||||
# - null_closures # not yet tested
|
# - null_closures # not yet tested
|
||||||
# - omit_local_variable_types # opposite of always_specify_types
|
# - omit_local_variable_types # opposite of always_specify_types
|
||||||
@ -189,11 +192,13 @@ linter:
|
|||||||
- unnecessary_overrides
|
- unnecessary_overrides
|
||||||
- unnecessary_parenthesis
|
- unnecessary_parenthesis
|
||||||
- unnecessary_statements
|
- unnecessary_statements
|
||||||
|
- unnecessary_string_interpolations
|
||||||
- unnecessary_this
|
- unnecessary_this
|
||||||
- unrelated_type_equality_checks
|
- unrelated_type_equality_checks
|
||||||
# - unsafe_html # not yet tested
|
# - unsafe_html # not yet tested
|
||||||
- use_full_hex_values_for_flutter_colors
|
- use_full_hex_values_for_flutter_colors
|
||||||
# - use_function_type_syntax_for_parameters # not yet tested
|
# - use_function_type_syntax_for_parameters # not yet tested
|
||||||
|
# - use_key_in_widget_constructors # not yet tested
|
||||||
- use_rethrow_when_possible
|
- use_rethrow_when_possible
|
||||||
# - use_setters_to_change_properties # not yet tested
|
# - use_setters_to_change_properties # not yet tested
|
||||||
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
|
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182
|
||||||
|
@ -20,7 +20,7 @@ import 'package:flutter_devicelab/framework/utils.dart';
|
|||||||
const int benchmarkServerPort = 9999;
|
const int benchmarkServerPort = 9999;
|
||||||
|
|
||||||
Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
|
Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
|
||||||
final String macrobenchmarksDirectory = path.join('${flutterDirectory.path}', 'dev', 'benchmarks', 'macrobenchmarks');
|
final String macrobenchmarksDirectory = path.join(flutterDirectory.path, 'dev', 'benchmarks', 'macrobenchmarks');
|
||||||
return await inDirectory(macrobenchmarksDirectory, () async {
|
return await inDirectory(macrobenchmarksDirectory, () async {
|
||||||
await evalFlutter('build', options: <String>[
|
await evalFlutter('build', options: <String>[
|
||||||
'web',
|
'web',
|
||||||
@ -71,7 +71,7 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
|
|||||||
'This request is not handled by the profile-data handler.');
|
'This request is not handled by the profile-data handler.');
|
||||||
}
|
}
|
||||||
}).add(createStaticHandler(
|
}).add(createStaticHandler(
|
||||||
path.join('$macrobenchmarksDirectory', 'build', 'web'),
|
path.join(macrobenchmarksDirectory, 'build', 'web'),
|
||||||
));
|
));
|
||||||
|
|
||||||
server = await io.HttpServer.bind('localhost', benchmarkServerPort);
|
server = await io.HttpServer.bind('localhost', benchmarkServerPort);
|
||||||
|
@ -257,7 +257,7 @@ String genSimpleMethod(Message message) {
|
|||||||
|
|
||||||
return getterMethodTemplate
|
return getterMethodTemplate
|
||||||
.replaceAll('@(methodName)', message.resourceId)
|
.replaceAll('@(methodName)', message.resourceId)
|
||||||
.replaceAll('@(message)', '${genSimpleMethodMessage()}')
|
.replaceAll('@(message)', genSimpleMethodMessage())
|
||||||
.replaceAll('@(intlMethodArgs)', generateIntlMethodArgs(message).join(',\n '));
|
.replaceAll('@(intlMethodArgs)', generateIntlMethodArgs(message).join(',\n '));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user