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_logic_in_create_state
# - no_runtimeType_toString # ok in tests; we enable this only in packages/
- noop_primitive_operations
- non_constant_identifier_names
- null_check_on_nullable_type_parameter
- null_closures

View file

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

View file

@ -45,7 +45,7 @@ class UwpTool {
return <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();
if (packageFamily.isNotEmpty) {
packageFamilies.add(packageFamily);
@ -82,7 +82,7 @@ class UwpTool {
return null;
}
// 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');
return processId;
}

View file

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

View file

@ -681,7 +681,6 @@ assembleProfile
'\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'
''
)
);
}, overrides: <Type, Generator>{
@ -719,7 +718,6 @@ assembleProfile
' checkReleaseBuilds false\n'
' }\n'
'}\n'
''
)
);
}, 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 remove dependency locking, remove the `dependencyLocking` from /android/build.gradle\n'
'\n'
''
)
);
}, overrides: <Type, Generator>{