update lint list + enable unnecessary_string_interpolations (#50593)

This commit is contained in:
Alexandre Ardhuin 2020-02-14 09:43:52 +01:00 committed by GitHub
parent b34046903b
commit 0bd45bc222
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -69,6 +69,7 @@ linter:
# - avoid_positional_boolean_parameters # 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_redundant_argument_values # not yet tested
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
@ -113,9 +114,11 @@ linter:
# - lines_longer_than_80_chars # not yet tested
- list_remove_unrelated_type
# - 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_duplicate_case_values
# - no_logic_in_create_state # not yet tested
# - no_runtimeType_toString # not yet tested
- non_constant_identifier_names
# - null_closures # not yet tested
# - omit_local_variable_types # opposite of always_specify_types
@ -189,11 +192,13 @@ linter:
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_string_interpolations
- unnecessary_this
- unrelated_type_equality_checks
# - unsafe_html # not yet tested
- use_full_hex_values_for_flutter_colors
# - use_function_type_syntax_for_parameters # not yet tested
# - use_key_in_widget_constructors # not yet tested
- use_rethrow_when_possible
# - use_setters_to_change_properties # not yet tested
# - use_string_buffers # has false positives: https://github.com/dart-lang/sdk/issues/34182

View file

@ -20,7 +20,7 @@ import 'package:flutter_devicelab/framework/utils.dart';
const int benchmarkServerPort = 9999;
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 {
await evalFlutter('build', options: <String>[
'web',
@ -71,7 +71,7 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
'This request is not handled by the profile-data handler.');
}
}).add(createStaticHandler(
path.join('$macrobenchmarksDirectory', 'build', 'web'),
path.join(macrobenchmarksDirectory, 'build', 'web'),
));
server = await io.HttpServer.bind('localhost', benchmarkServerPort);

View file

@ -257,7 +257,7 @@ String genSimpleMethod(Message message) {
return getterMethodTemplate
.replaceAll('@(methodName)', message.resourceId)
.replaceAll('@(message)', '${genSimpleMethodMessage()}')
.replaceAll('@(message)', genSimpleMethodMessage())
.replaceAll('@(intlMethodArgs)', generateIntlMethodArgs(message).join(',\n '));
}