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
cae740b9
Unverified
Commit
cae740b9
authored
Apr 08, 2022
by
Michael Goderbauer
Committed by
GitHub
Apr 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable strict-casts (as replacement for implicit-casts) (#101567)
parent
3109073f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
12 deletions
+9
-12
analysis_options.yaml
analysis_options.yaml
+4
-7
text_input.dart
packages/flutter/lib/src/services/text_input.dart
+1
-1
deferred_components_gen_snapshot_validator.dart
...c/android/deferred_components_gen_snapshot_validator.dart
+2
-2
deferred_component.dart
packages/flutter_tools/lib/src/base/deferred_component.dart
+1
-1
flutter_manifest.dart
packages/flutter_tools/lib/src/flutter_manifest.dart
+1
-1
No files found.
analysis_options.yaml
View file @
cae740b9
# Specify analysis options.
# Specify analysis options.
#
#
# Until there are meta linter rules, each desired lint must be explicitly enabled.
# See: https://github.com/dart-lang/linter/issues/288
#
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
# See the configuration guide for more
# See the configuration guide for more
# https://github.com/dart-lang/sdk/tree/main/pkg/analyzer#configuring-the-analyzer
# https://github.com/dart-lang/sdk/tree/main/pkg/analyzer#configuring-the-analyzer
...
@@ -15,11 +12,12 @@
...
@@ -15,11 +12,12 @@
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
# - https://github.com/flutter/engine/blob/master/analysis_options.yaml
# - https://github.com/flutter/packages/blob/master/analysis_options.yaml
# - https://github.com/flutter/packages/blob/master/analysis_options.yaml
#
#
# This file contains the analysis options used
by Flutter tools, such as IntelliJ,
# This file contains the analysis options used
for code in the flutter/flutter
#
Android Studio, and the `flutter analyze` command
.
#
repository
.
analyzer
:
analyzer
:
language
:
language
:
strict-casts
:
true
strict-raw-types
:
true
strict-raw-types
:
true
errors
:
errors
:
# treat missing required parameters as a warning (not a hint)
# treat missing required parameters as a warning (not a hint)
...
@@ -43,8 +41,7 @@ analyzer:
...
@@ -43,8 +41,7 @@ analyzer:
linter
:
linter
:
rules
:
rules
:
# these rules are documented on and in the same order as
# This list is derived from the list of all available lints located at
# the Dart Lint rules page to make maintenance easier
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
# https://github.com/dart-lang/linter/blob/master/example/all.yaml
-
always_declare_return_types
-
always_declare_return_types
-
always_put_control_body_on_new_line
-
always_put_control_body_on_new_line
...
...
packages/flutter/lib/src/services/text_input.dart
View file @
cae740b9
...
@@ -1735,7 +1735,7 @@ class TextInput {
...
@@ -1735,7 +1735,7 @@ class TextInput {
final
Map
<
String
,
dynamic
>
encoded
=
args
[
1
]
as
Map
<
String
,
dynamic
>;
final
Map
<
String
,
dynamic
>
encoded
=
args
[
1
]
as
Map
<
String
,
dynamic
>;
for
(
final
dynamic
encodedDelta
in
encoded
[
'deltas'
])
{
for
(
final
dynamic
encodedDelta
in
encoded
[
'deltas'
]
as
List
<
dynamic
>
)
{
final
TextEditingDelta
delta
=
TextEditingDelta
.
fromJSON
(
encodedDelta
as
Map
<
String
,
dynamic
>);
final
TextEditingDelta
delta
=
TextEditingDelta
.
fromJSON
(
encodedDelta
as
Map
<
String
,
dynamic
>);
deltas
.
add
(
delta
);
deltas
.
add
(
delta
);
}
}
...
...
packages/flutter_tools/lib/src/android/deferred_components_gen_snapshot_validator.dart
View file @
cae740b9
...
@@ -234,7 +234,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
...
@@ -234,7 +234,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
return
loadingUnits
;
return
loadingUnits
;
}
}
if
(
data
[
'loading-units'
]
!=
null
)
{
if
(
data
[
'loading-units'
]
!=
null
)
{
for
(
final
Object
?
loadingUnitData
in
data
[
'loading-units'
])
{
for
(
final
Object
?
loadingUnitData
in
data
[
'loading-units'
]
as
List
<
Object
?>
)
{
if
(
loadingUnitData
is
!
YamlMap
)
{
if
(
loadingUnitData
is
!
YamlMap
)
{
invalidFiles
[
cacheFile
.
path
]
=
"Invalid loading units yaml file, 'loading-units' "
invalidFiles
[
cacheFile
.
path
]
=
"Invalid loading units yaml file, 'loading-units' "
'is not a list of maps.'
;
'is not a list of maps.'
;
...
@@ -267,7 +267,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
...
@@ -267,7 +267,7 @@ class DeferredComponentsGenSnapshotValidator extends DeferredComponentsValidator
// Parse out validated yaml.
// Parse out validated yaml.
if
(
data
.
containsKey
(
'loading-units'
))
{
if
(
data
.
containsKey
(
'loading-units'
))
{
if
(
data
[
'loading-units'
]
!=
null
)
{
if
(
data
[
'loading-units'
]
!=
null
)
{
for
(
final
Object
?
loadingUnitData
in
data
[
'loading-units'
])
{
for
(
final
Object
?
loadingUnitData
in
data
[
'loading-units'
]
as
List
<
Object
?>
)
{
final
YamlMap
?
loadingUnitDataMap
=
loadingUnitData
as
YamlMap
?;
final
YamlMap
?
loadingUnitDataMap
=
loadingUnitData
as
YamlMap
?;
final
List
<
String
>
libraries
=
<
String
>[];
final
List
<
String
>
libraries
=
<
String
>[];
final
YamlList
?
nodes
=
loadingUnitDataMap
?[
'libraries'
]
as
YamlList
?;
final
YamlList
?
nodes
=
loadingUnitDataMap
?[
'libraries'
]
as
YamlList
?;
...
...
packages/flutter_tools/lib/src/base/deferred_component.dart
View file @
cae740b9
...
@@ -195,7 +195,7 @@ class LoadingUnit {
...
@@ -195,7 +195,7 @@ class LoadingUnit {
final
List
<
LoadingUnit
>
loadingUnits
=
<
LoadingUnit
>[];
final
List
<
LoadingUnit
>
loadingUnits
=
<
LoadingUnit
>[];
// Setup android source directory
// Setup android source directory
if
(
manifest
!=
null
)
{
if
(
manifest
!=
null
)
{
for
(
final
dynamic
loadingUnitMetadata
in
manifest
[
'loadingUnits'
])
{
for
(
final
dynamic
loadingUnitMetadata
in
manifest
[
'loadingUnits'
]
as
List
<
dynamic
>
)
{
final
Map
<
String
,
dynamic
>
loadingUnitMap
=
loadingUnitMetadata
as
Map
<
String
,
dynamic
>;
final
Map
<
String
,
dynamic
>
loadingUnitMap
=
loadingUnitMetadata
as
Map
<
String
,
dynamic
>;
if
(
loadingUnitMap
[
'id'
]
==
1
)
{
if
(
loadingUnitMap
[
'id'
]
==
1
)
{
continue
;
// Skip base unit
continue
;
// Skip base unit
...
...
packages/flutter_tools/lib/src/flutter_manifest.dart
View file @
cae740b9
...
@@ -636,7 +636,7 @@ void _validateFonts(YamlList fonts, List<String> errors) {
...
@@ -636,7 +636,7 @@ void _validateFonts(YamlList fonts, List<String> errors) {
errors
.
add
(
'Expected "fonts" to either be null or a list.'
);
errors
.
add
(
'Expected "fonts" to either be null or a list.'
);
continue
;
continue
;
}
}
for
(
final
Object
?
fontMapList
in
fontMap
[
'fonts'
])
{
for
(
final
Object
?
fontMapList
in
fontMap
[
'fonts'
]
as
List
<
Object
?>
)
{
if
(
fontMapList
is
!
YamlMap
)
{
if
(
fontMapList
is
!
YamlMap
)
{
errors
.
add
(
'Expected "fonts" to be a list of maps.'
);
errors
.
add
(
'Expected "fonts" to be a list of maps.'
);
continue
;
continue
;
...
...
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