Unverified Commit 217b2bda authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

add new lints of linter-0.1.44 and enable unnecessary_parenthesis (#15585)

parent d518bd2d
......@@ -63,6 +63,7 @@ linter:
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # not yet tested
# - avoid_relative_lib_imports # not yet tested
- avoid_return_types_on_setters
# - avoid_returning_null # we do this commonly
# - avoid_returning_this # https://github.com/dart-lang/linter/issues/842
......@@ -141,6 +142,7 @@ linter:
- unnecessary_null_aware_assignments
- unnecessary_null_in_if_null_operators
- unnecessary_overrides
- unnecessary_parenthesis
# - unnecessary_statements # not yet tested
- unnecessary_this
- unrelated_type_equality_checks
......
......@@ -56,6 +56,7 @@ linter:
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # not yet tested
# - avoid_relative_lib_imports # not yet tested
- avoid_return_types_on_setters
# - avoid_returning_null # we do this commonly
# - avoid_returning_this # https://github.com/dart-lang/linter/issues/842
......@@ -134,6 +135,7 @@ linter:
- unnecessary_null_aware_assignments
- unnecessary_null_in_if_null_operators
- unnecessary_overrides
- unnecessary_parenthesis
# - unnecessary_statements # not yet tested
- unnecessary_this
- unrelated_type_equality_checks
......
......@@ -754,7 +754,7 @@ class PaddleSliderValueIndicatorShape extends SliderComponentShape {
if (bottomRight.dx > parentBox.size.width - edgeMargin) {
shift = parentBox.size.width - bottomRight.dx - edgeMargin;
}
shift = (scale == 0.0 ? 0.0 : shift / scale);
shift = scale == 0.0 ? 0.0 : shift / scale;
return shift;
}
......
......@@ -248,7 +248,7 @@ Future<XcodeBuildResult> buildXcodeProject({
appIosDirectory: appDirectory,
iosEngineDir: flutterFrameworkDir(buildInfo.mode),
isSwift: app.isSwift,
flutterPodChanged: (previousGeneratedXcconfig != currentGeneratedXcconfig),
flutterPodChanged: previousGeneratedXcconfig != currentGeneratedXcconfig,
);
}
......
......@@ -155,7 +155,7 @@ class VsCode {
static List<VsCode> _findInstalled(
List<_VsCodeInstallLocation> allLocations) {
final Iterable<_VsCodeInstallLocation> searchLocations =
final Iterable<_VsCodeInstallLocation> searchLocations =
_includeInsiders
? allLocations
: allLocations.where((_VsCodeInstallLocation p) => p.isInsiders != true);
......@@ -175,7 +175,7 @@ class VsCode {
@override
String toString() =>
'VS Code ($version)${(_extensionVersion != Version.unknown ? ', Dart Code ($_extensionVersion)' : '')}';
'VS Code ($version)${_extensionVersion != Version.unknown ? ', Dart Code ($_extensionVersion)' : ''}';
static String _getVersionFromPackageJson(String packageJsonPath) {
if (!fs.isFileSync(packageJsonPath))
......
......@@ -42,7 +42,7 @@ void main() {
MockAndroidSdk.createSdkDirectory();
when(sdk.sdkManagerPath).thenReturn('/foo/bar/sdkmanager');
final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted);
final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.unknown));
expect(processManager.commands.first, equals('/foo/bar/sdkmanager'));
expect(processManager.commands.last, equals('--licenses'));
......@@ -63,7 +63,7 @@ void main() {
]);
final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted);
final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.all));
}, overrides: <Type, Generator>{
AndroidSdk: () => sdk,
......@@ -83,7 +83,7 @@ void main() {
]);
final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted);
final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.some));
}, overrides: <Type, Generator>{
AndroidSdk: () => sdk,
......@@ -103,7 +103,7 @@ void main() {
]);
final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted);
final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.none));
}, overrides: <Type, Generator>{
AndroidSdk: () => sdk,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment