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
4adad2c6
Unverified
Commit
4adad2c6
authored
Dec 23, 2019
by
Alexandre Ardhuin
Committed by
GitHub
Dec 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update list of lints (#47661)
parent
fcaf9c40
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
7 deletions
+15
-7
analysis_options.yaml
analysis_options.yaml
+9
-0
force_press.dart
packages/flutter/lib/src/gestures/force_press.dart
+1
-1
platform_view.dart
packages/flutter/lib/src/rendering/platform_view.dart
+1
-2
flow_test.dart
packages/flutter/test/widgets/flow_test.dart
+1
-1
application_package.dart
packages/flutter_tools/lib/src/application_package.dart
+1
-1
plugins.dart
packages/flutter_tools/lib/src/plugins.dart
+1
-1
protocol_discovery.dart
packages/flutter_tools/lib/src/protocol_discovery.dart
+1
-1
No files found.
analysis_options.yaml
View file @
4adad2c6
...
...
@@ -59,6 +59,7 @@ linter:
-
avoid_classes_with_only_static_members
# - avoid_double_and_int_checks # only useful when targeting JS runtime
-
avoid_empty_else
# - avoid_equals_and_hash_code_on_mutable_classes # not yet tested
-
avoid_field_initializers_in_const_classes
-
avoid_function_literals_in_foreach_calls
# - avoid_implementing_value_types # not yet tested
...
...
@@ -66,6 +67,7 @@ linter:
# - avoid_js_rounded_ints # only useful when targeting JS runtime
-
avoid_null_checks_in_equality_operators
# - avoid_positional_boolean_parameters # not yet tested
# - avoid_print # not yet tested
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
-
avoid_relative_lib_imports
-
avoid_renaming_method_parameters
...
...
@@ -80,9 +82,12 @@ linter:
-
avoid_slow_async_io
-
avoid_types_as_parameter_names
# - avoid_types_on_closure_parameters # conflicts with always_specify_types
# - avoid_unnecessary_containers # not yet tested
-
avoid_unused_constructor_parameters
-
avoid_void_async
# - avoid_web_libraries_in_flutter # not yet tested
-
await_only_futures
-
camel_case_extensions
-
camel_case_types
-
cancel_subscriptions
# - cascade_invocations # not yet tested
...
...
@@ -110,6 +115,7 @@ linter:
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/sdk/issues/34181
-
no_adjacent_strings_in_list
-
no_duplicate_case_values
# - no_logic_in_create_state # not yet tested
-
non_constant_identifier_names
# - null_closures # not yet tested
# - omit_local_variable_types # opposite of always_specify_types
...
...
@@ -149,9 +155,11 @@ linter:
# - prefer_interpolation_to_compose_strings # not yet tested
-
prefer_is_empty
-
prefer_is_not_empty
-
prefer_is_not_operator
-
prefer_iterable_whereType
# - prefer_mixin # https://github.com/dart-lang/language/issues/32
# - prefer_null_aware_operators # disable until NNBD, see https://github.com/flutter/flutter/pull/32711#issuecomment-492930932
# - prefer_relative_imports # not yet tested
-
prefer_single_quotes
-
prefer_spread_collections
-
prefer_typing_uninitialized_variables
...
...
@@ -172,6 +180,7 @@ linter:
# - unnecessary_await_in_return # not yet tested
-
unnecessary_brace_in_string_interps
-
unnecessary_const
# - unnecessary_final # conflicts with prefer_final_locals
-
unnecessary_getters_setters
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
-
unnecessary_new
...
...
packages/flutter/lib/src/gestures/force_press.dart
View file @
4adad2c6
...
...
@@ -216,7 +216,7 @@ class ForcePressGestureRecognizer extends OneSequenceGestureRecognizer {
// If the device has a maximum pressure of less than or equal to 1, it
// doesn't have touch pressure sensing capabilities. Do not participate
// in the gesture arena.
if
(
!(
event
is
PointerUpEvent
)
&&
event
.
pressureMax
<=
1.0
)
{
if
(
event
is
!
PointerUpEvent
&&
event
.
pressureMax
<=
1.0
)
{
resolve
(
GestureDisposition
.
rejected
);
}
else
{
startTrackingPointer
(
event
.
pointer
,
event
.
transform
);
...
...
packages/flutter/lib/src/rendering/platform_view.dart
View file @
4adad2c6
...
...
@@ -687,8 +687,7 @@ class _MotionEventsDispatcher {
return
AndroidPointerProperties
(
id:
pointerId
,
toolType:
toolType
);
}
bool
isSinglePointerAction
(
PointerEvent
event
)
=>
!(
event
is
PointerDownEvent
)
&&
!(
event
is
PointerUpEvent
);
bool
isSinglePointerAction
(
PointerEvent
event
)
=>
event
is
!
PointerDownEvent
&&
event
is
!
PointerUpEvent
;
}
/// A render object for embedding a platform view.
...
...
packages/flutter/test/widgets/flow_test.dart
View file @
4adad2c6
...
...
@@ -148,7 +148,7 @@ void main() {
),
);
ContainerLayer
layer
=
RendererBinding
.
instance
.
renderView
.
debugLayer
;
while
(
layer
!=
null
&&
!(
layer
is
OpacityLayer
)
)
while
(
layer
!=
null
&&
layer
is
!
OpacityLayer
)
layer
=
layer
.
firstChild
as
ContainerLayer
;
expect
(
layer
,
isInstanceOf
<
OpacityLayer
>());
final
OpacityLayer
opacityLayer
=
layer
as
OpacityLayer
;
...
...
packages/flutter_tools/lib/src/application_package.dart
View file @
4adad2c6
...
...
@@ -223,7 +223,7 @@ class AndroidApk extends ApplicationPackage {
String
actionName
=
''
;
String
categoryName
=
''
;
for
(
xml
.
XmlNode
node
in
element
.
children
)
{
if
(
!(
node
is
xml
.
XmlElement
)
)
{
if
(
node
is
!
xml
.
XmlElement
)
{
continue
;
}
final
xml
.
XmlElement
xmlElement
=
node
as
xml
.
XmlElement
;
...
...
packages/flutter_tools/lib/src/plugins.dart
View file @
4adad2c6
...
...
@@ -201,7 +201,7 @@ class Plugin {
static
List
<
String
>
_validateMultiPlatformYaml
(
YamlMap
yaml
)
{
bool
isInvalid
(
String
key
,
bool
Function
(
YamlMap
)
validate
)
{
final
dynamic
value
=
yaml
[
key
];
if
(
!(
value
is
YamlMap
)
)
{
if
(
value
is
!
YamlMap
)
{
return
false
;
}
final
YamlMap
yamlValue
=
value
as
YamlMap
;
...
...
packages/flutter_tools/lib/src/protocol_discovery.dart
View file @
4adad2c6
...
...
@@ -158,7 +158,7 @@ class _BufferedStreamController<T> {
StreamController
<
T
>
get
_streamController
{
_streamControllerInstance
??=
StreamController
<
T
>.
broadcast
(
onListen:
()
{
for
(
dynamic
event
in
_events
)
{
assert
(
!(
T
is
List
)
);
assert
(
T
is
!
List
);
if
(
event
is
T
)
{
_streamControllerInstance
.
add
(
event
);
}
else
{
...
...
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