enable lint noop_primitive_operations (#83930)

This commit is contained in:
Alexandre Ardhuin 2021-06-04 02:34:10 +02:00 committed by GitHub
parent 871b0ce363
commit 32540774c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 7 deletions

View File

@ -132,6 +132,7 @@ linter:
- no_duplicate_case_values - no_duplicate_case_values
- no_logic_in_create_state - no_logic_in_create_state
# - no_runtimeType_toString # ok in tests; we enable this only in packages/ # - no_runtimeType_toString # ok in tests; we enable this only in packages/
- noop_primitive_operations
- non_constant_identifier_names - non_constant_identifier_names
- null_check_on_nullable_type_parameter - null_check_on_nullable_type_parameter
- null_closures - null_closures

View File

@ -274,7 +274,7 @@ class MediaQueryData {
/// right: systemGestureInsets.right, /// right: systemGestureInsets.right,
/// ), /// ),
/// child: Slider( /// child: Slider(
/// value: _currentValue.toDouble(), /// value: _currentValue,
/// onChanged: (double newValue) { /// onChanged: (double newValue) {
/// setState(() { /// setState(() {
/// _currentValue = newValue; /// _currentValue = newValue;

View File

@ -45,7 +45,7 @@ class UwpTool {
return <String>[]; return <String>[];
} }
final List<String> packageFamilies = <String>[]; final List<String> packageFamilies = <String>[];
for (final String line in result.stdout.toString().split('\n')) { for (final String line in result.stdout.split('\n')) {
final String packageFamily = line.trim(); final String packageFamily = line.trim();
if (packageFamily.isNotEmpty) { if (packageFamily.isNotEmpty) {
packageFamilies.add(packageFamily); packageFamilies.add(packageFamily);
@ -82,7 +82,7 @@ class UwpTool {
return null; return null;
} }
// Read the process ID from stdout. // Read the process ID from stdout.
final int processId = int.tryParse(result.stdout.toString().trim()); final int processId = int.tryParse(result.stdout.trim());
_logger.printTrace('Launched application $packageFamily with process ID $processId'); _logger.printTrace('Launched application $packageFamily with process ID $processId');
return processId; return processId;
} }

View File

@ -256,7 +256,7 @@ class WindowsUWPDevice extends Device {
final List<String> dependencyUris = _getDependencyPaths(buildDirectory, 'x64') final List<String> dependencyUris = _getDependencyPaths(buildDirectory, 'x64')
.map((String path) => Uri.file(path).toString()) .map((String path) => Uri.file(path).toString())
.toList(); .toList();
return _uwptool.installApp(packageUri.toString(), dependencyUris); return _uwptool.installApp(packageUri, dependencyUris);
} }
@override @override

View File

@ -681,7 +681,6 @@ assembleProfile
'\n' '\n'
"Note that your app won't be available to users running Android SDKs below 19.\n" "Note that your app won't be available to users running Android SDKs below 19.\n"
'Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.\n' 'Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.\n'
''
) )
); );
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
@ -719,7 +718,6 @@ assembleProfile
' checkReleaseBuilds false\n' ' checkReleaseBuilds false\n'
' }\n' ' }\n'
'}\n' '}\n'
''
) )
); );
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
@ -757,7 +755,6 @@ Execution failed for task ':app:generateDebugFeatureTransitiveDeps'.
'To regenerate the lockfiles run: `./gradlew :generateLockfiles` in /android/build.gradle\n' 'To regenerate the lockfiles run: `./gradlew :generateLockfiles` in /android/build.gradle\n'
'To remove dependency locking, remove the `dependencyLocking` from /android/build.gradle\n' 'To remove dependency locking, remove the `dependencyLocking` from /android/build.gradle\n'
'\n' '\n'
''
) )
); );
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{