Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
217b2bda
Unverified
Commit
217b2bda
authored
Mar 21, 2018
by
Alexandre Ardhuin
Committed by
GitHub
Mar 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new lints of linter-0.1.44 and enable unnecessary_parenthesis (#15585)
parent
d518bd2d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
8 deletions
+12
-8
analysis_options.yaml
analysis_options.yaml
+2
-0
analysis_options_repo.yaml
analysis_options_repo.yaml
+2
-0
slider_theme.dart
packages/flutter/lib/src/material/slider_theme.dart
+1
-1
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+1
-1
vscode.dart
packages/flutter_tools/lib/src/vscode/vscode.dart
+2
-2
android_workflow_test.dart
...ges/flutter_tools/test/android/android_workflow_test.dart
+4
-4
No files found.
analysis_options.yaml
View file @
217b2bda
...
@@ -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
...
...
analysis_options_repo.yaml
View file @
217b2bda
...
@@ -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
...
...
packages/flutter/lib/src/material/slider_theme.dart
View file @
217b2bda
...
@@ -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
;
}
}
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
217b2bda
...
@@ -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
,
);
);
}
}
...
...
packages/flutter_tools/lib/src/vscode/vscode.dart
View file @
217b2bda
...
@@ -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
))
...
...
packages/flutter_tools/test/android/android_workflow_test.dart
View file @
217b2bda
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment