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: ...@@ -63,6 +63,7 @@ linter:
- avoid_init_to_null - avoid_init_to_null
- avoid_null_checks_in_equality_operators - avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # not yet tested # - avoid_positional_boolean_parameters # not yet tested
# - avoid_relative_lib_imports # not yet tested
- avoid_return_types_on_setters - avoid_return_types_on_setters
# - avoid_returning_null # we do this commonly # - avoid_returning_null # we do this commonly
# - avoid_returning_this # https://github.com/dart-lang/linter/issues/842 # - avoid_returning_this # https://github.com/dart-lang/linter/issues/842
...@@ -141,6 +142,7 @@ linter: ...@@ -141,6 +142,7 @@ linter:
- unnecessary_null_aware_assignments - unnecessary_null_aware_assignments
- unnecessary_null_in_if_null_operators - unnecessary_null_in_if_null_operators
- unnecessary_overrides - unnecessary_overrides
- unnecessary_parenthesis
# - unnecessary_statements # not yet tested # - unnecessary_statements # not yet tested
- unnecessary_this - unnecessary_this
- unrelated_type_equality_checks - unrelated_type_equality_checks
......
...@@ -56,6 +56,7 @@ linter: ...@@ -56,6 +56,7 @@ linter:
- avoid_init_to_null - avoid_init_to_null
- avoid_null_checks_in_equality_operators - avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # not yet tested # - avoid_positional_boolean_parameters # not yet tested
# - avoid_relative_lib_imports # not yet tested
- avoid_return_types_on_setters - avoid_return_types_on_setters
# - avoid_returning_null # we do this commonly # - avoid_returning_null # we do this commonly
# - avoid_returning_this # https://github.com/dart-lang/linter/issues/842 # - avoid_returning_this # https://github.com/dart-lang/linter/issues/842
...@@ -134,6 +135,7 @@ linter: ...@@ -134,6 +135,7 @@ linter:
- unnecessary_null_aware_assignments - unnecessary_null_aware_assignments
- unnecessary_null_in_if_null_operators - unnecessary_null_in_if_null_operators
- unnecessary_overrides - unnecessary_overrides
- unnecessary_parenthesis
# - unnecessary_statements # not yet tested # - unnecessary_statements # not yet tested
- unnecessary_this - unnecessary_this
- unrelated_type_equality_checks - unrelated_type_equality_checks
......
...@@ -754,7 +754,7 @@ class PaddleSliderValueIndicatorShape extends SliderComponentShape { ...@@ -754,7 +754,7 @@ class PaddleSliderValueIndicatorShape extends SliderComponentShape {
if (bottomRight.dx > parentBox.size.width - edgeMargin) { if (bottomRight.dx > parentBox.size.width - edgeMargin) {
shift = parentBox.size.width - bottomRight.dx - 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; return shift;
} }
......
...@@ -248,7 +248,7 @@ Future<XcodeBuildResult> buildXcodeProject({ ...@@ -248,7 +248,7 @@ Future<XcodeBuildResult> buildXcodeProject({
appIosDirectory: appDirectory, appIosDirectory: appDirectory,
iosEngineDir: flutterFrameworkDir(buildInfo.mode), iosEngineDir: flutterFrameworkDir(buildInfo.mode),
isSwift: app.isSwift, isSwift: app.isSwift,
flutterPodChanged: (previousGeneratedXcconfig != currentGeneratedXcconfig), flutterPodChanged: previousGeneratedXcconfig != currentGeneratedXcconfig,
); );
} }
......
...@@ -175,7 +175,7 @@ class VsCode { ...@@ -175,7 +175,7 @@ class VsCode {
@override @override
String toString() => 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) { static String _getVersionFromPackageJson(String packageJsonPath) {
if (!fs.isFileSync(packageJsonPath)) if (!fs.isFileSync(packageJsonPath))
......
...@@ -42,7 +42,7 @@ void main() { ...@@ -42,7 +42,7 @@ void main() {
MockAndroidSdk.createSdkDirectory(); MockAndroidSdk.createSdkDirectory();
when(sdk.sdkManagerPath).thenReturn('/foo/bar/sdkmanager'); when(sdk.sdkManagerPath).thenReturn('/foo/bar/sdkmanager');
final AndroidWorkflow androidWorkflow = new AndroidWorkflow(); final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted); final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.unknown)); expect(result, equals(LicensesAccepted.unknown));
expect(processManager.commands.first, equals('/foo/bar/sdkmanager')); expect(processManager.commands.first, equals('/foo/bar/sdkmanager'));
expect(processManager.commands.last, equals('--licenses')); expect(processManager.commands.last, equals('--licenses'));
...@@ -63,7 +63,7 @@ void main() { ...@@ -63,7 +63,7 @@ void main() {
]); ]);
final AndroidWorkflow androidWorkflow = new AndroidWorkflow(); final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted); final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.all)); expect(result, equals(LicensesAccepted.all));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
AndroidSdk: () => sdk, AndroidSdk: () => sdk,
...@@ -83,7 +83,7 @@ void main() { ...@@ -83,7 +83,7 @@ void main() {
]); ]);
final AndroidWorkflow androidWorkflow = new AndroidWorkflow(); final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted); final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.some)); expect(result, equals(LicensesAccepted.some));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
AndroidSdk: () => sdk, AndroidSdk: () => sdk,
...@@ -103,7 +103,7 @@ void main() { ...@@ -103,7 +103,7 @@ void main() {
]); ]);
final AndroidWorkflow androidWorkflow = new AndroidWorkflow(); final AndroidWorkflow androidWorkflow = new AndroidWorkflow();
final LicensesAccepted result = await(androidWorkflow.licensesAccepted); final LicensesAccepted result = await androidWorkflow.licensesAccepted;
expect(result, equals(LicensesAccepted.none)); expect(result, equals(LicensesAccepted.none));
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
AndroidSdk: () => sdk, 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