Commit cc3dca6
authored
[all] Omit obvious local types (flutter#10511)
Makes the analysis options changes described in
flutter/flutter#178827:
- Adding
[omit_obvious_local_variable_types](https://dart.dev/tools/linter-rules/omit_obvious_local_variable_types)
- Adding
[specify_nonobvious_local_variable_types](https://dart.dev/tools/linter-rules/specify_nonobvious_local_variable_types)
- Adding
[specify_nonobvious_property_types](https://dart.dev/tools/linter-rules/specify_nonobvious_property_types)
- Adding
[type_annotate_public_apis](https://dart.dev/tools/linter-rules/type_annotate_public_apis)
- Removing
[always_specify_types](https://dart.dev/tools/linter-rules/always_specify_types)
After those changes, makes the following repo-wide changes:
- `dart fix --apply` in all packages and in script/tool/
- `dart format` in all packages and in script/tool/
- `update-excerpts` repo tooling command to update excerpts based on the
changes to their sources
Also updates the min Flutter/Dart SDK version to 3.35/3.9 for the
following packages, to avoid `analyze` failures in the `N-2` legacy
analysis run due to what appears to be a 3.9 change in what the Dart
analyzer continues to be an obvious local type in loop iterations:
- go_router
- google_fonts
- google_identity_services_web
- google_maps_flutter_web
- local_auth_platform_interface
- metrics_center
- multicast_dns
- pigeon
- rfw
- shared_preferences
- two_dimensional_scrollables
- vector_graphics_compiler
- mustache_template
- path_parsing
Because this is causing a significant amount of format churn already, I
took this opportunity to update the repository tooling to a min Dart SDK
of 3.8 (the N-2 stable version, so the earliest version we need the
tooling to support) to pick up the new format style, so the amount of
automated formatter change is higher in script/tool/ than in the
packages.
This does contain two manual changes (other than the repo tooling min
version):
-
flutter@d700b45
changes `dynamic` to `Object?` in a few places where `dynamic` caused
analyzer warnings under the new rule set.
- Updates the repo tooling to ignore `.dart_tool/` when looking for
unexpected local `analysis_options.yaml` files, to fix issues running
the repo tool's `analyze` command locally based on recent changes in
`dart` behavior.
This does not include any CHANGELOG or version updates; even though we
normally version any changes to production code, mass automated changes
like this aren't worth the churn of releasing. This includes changes to
lib/example/main.dart and to README.md excerpts; while the style changes
will be user-visible on pub.dev, it's fine for those changes to wait for
the next release of each package.
Part of flutter/flutter#1788271 parent e019cf9 commit cc3dca6
File tree
1,010 files changed
+38564
-36641
lines changed- packages
- animations
- example/lib
- lib/src
- test
- camera
- camera_android_camerax
- example
- integration_test
- lib
- lib/src
- test
- camera_android
- example
- integration_test
- lib
- test_driver
- lib/src
- test
- camera_avfoundation
- example
- integration_test
- lib
- lib/src
- test
- camera_platform_interface
- lib/src/method_channel
- test
- events
- method_channel
- types
- camera_web
- example/integration_test
- helpers
- lib/src
- types
- camera_windows
- example
- integration_test
- lib
- test
- camera
- example
- integration_test
- lib
- test_driver
- test
- lib/src
- test
- cross_file
- example/lib
- lib/src/types
- test
- extension_google_sign_in_as_googleapis_auth
- example/lib
- lib
- test
- file_selector
- file_selector_android
- example/lib
- lib/src
- test
- file_selector_ios
- example/lib
- lib
- test
- file_selector_linux
- example/lib
- test
- file_selector_macos
- example/lib
- lib
- test
- file_selector_platform_interface/test
- file_selector_web
- example/integration_test
- lib/src
- test
- file_selector_windows
- example/lib
- test
- file_selector
- example/lib
- test
- go_router_builder
- example
- lib
- test
- lib/src
- tool
- go_router
- example
- lib
- books
- src/data
- others
- test
- state_restoration
- lib/src
- test
- helpers
- tool
- google_adsense
- example
- integration_test
- js_interop_mocks
- lib
- lib/src
- adsense
- core/js_interop
- h5
- google_fonts
- example
- lib
- test
- generator
- lib/src
- test
- google_identity_services_web
- example
- integration_test
- lib
- lib/src
- js_interop
- test
- google_maps_flutter
- google_maps_flutter_android
- example
- integration_test
- lib
- test
- lib/src
- test
- google_maps_flutter_ios
- example
- ios14/integration_test
- lib/src
- test
- google_maps_flutter_platform_interface
- lib/src
- method_channel
- types
- test
- method_channel
- platform_interface
- types
- utils
- google_maps_flutter_web
- example
- integration_test
- lib/src
- google_maps_flutter
- example
- integration_test/src
- lib
- test
- google_sign_in
- google_sign_in_android
- example/lib
- lib
- test
- google_sign_in_ios
- example/lib
- lib
- test
- google_sign_in_platform_interface/test
- google_sign_in_web
- example
- integration_test
- lib/src
- lib/src
- google_sign_in
- example/lib
- lib
- src
- test
- image_picker
- image_picker_android
- example/lib
- test
- image_picker_for_web
- example/integration_test
- lib
- src
- test
- image_picker_ios/example/lib
- image_picker_linux
- example/lib
- lib
- test
- image_picker_macos
- example/lib
- lib
- test
- image_picker_platform_interface
- lib/src/method_channel
- test
- image_picker_windows
- example/lib
- lib
- test
- image_picker
- example/lib
- lib
- test
- in_app_purchase
- in_app_purchase_android
- example/lib
- lib/src
- types
- test
- billing_client_wrappers
- types
- in_app_purchase_platform_interface/test
- src
- errors
- types
- in_app_purchase_storekit
- example/lib
- lib/src
- store_kit_wrappers
- types
- test
- fakes
- store_kit_wrappers
- in_app_purchase
- example/lib
- test
- interactive_media_ads
- lib/src
- android
- ios
- test
- android
- ios
- local_auth
- local_auth_android
- example/lib
- lib
- test
- local_auth_darwin
- example/lib
- lib
- test
- local_auth_platform_interface
- lib
- test
- local_auth_windows/example/lib
- local_auth/example/lib
- metrics_center
- lib/src
- test
- multicast_dns
- example
- lib
- src
- test
- tool
- path_provider
- path_provider_android/example
- integration_test
- lib
- path_provider_foundation
- example
- integration_test
- lib
- test
- tool
- path_provider_linux
- example/integration_test
- lib/src
- test
- path_provider_platform_interface/test
- path_provider_windows
- example
- integration_test
- lib
- lib/src
- test
- path_provider
- example
- integration_test
- lib
- lib
- pigeon
- example
- app/lib
- src
- lib/src
- cpp
- dart
- gobject
- java
- kotlin
- objc
- swift
- test
- dart
- kotlin
- swift
- tool
- plugin_platform_interface/lib
- pointer_interceptor
- pointer_interceptor_ios/example/lib
- pointer_interceptor_platform_interface/test
- pointer_interceptor_web/example/integration_test
- pointer_interceptor/example/lib/platforms
- quick_actions
- quick_actions_android
- example/lib
- lib
- test
- quick_actions_ios
- example
- integration_test
- lib
- lib
- test
- quick_actions_platform_interface/test
- quick_actions
- example
- integration_test
- lib
- test
- rfw
- example
- hello
- local
- remote
- lib
- lib/src
- dart
- flutter
- test_coverage
- bin
- test
- standard_message_codec
- lib
- src
- test
- two_dimensional_scrollables
- example
- lib
- table_view
- tree_view
- test/tree_view
- lib/src
- common
- table_view
- tree_view
- test
- common
- table_view
- tree_view
- url_launcher
- url_launcher_android
- example
- integration_test
- lib
- lib
- test
- url_launcher_ios
- example/lib
- test
- url_launcher_linux
- example/lib
- test
- url_launcher_macos
- example/lib
- test
- url_launcher_platform_interface
- lib
- test
- url_launcher_web
- example/integration_test
- lib/src
- url_launcher_windows
- example/lib
- test
- url_launcher
- example/lib
- lib/src
- test
- src
- vector_graphics_codec
- lib
- src
- test
- vector_graphics_compiler
- bin
- util
- lib
- src
- geometry
- image
- svg
- test
- vector_graphics
- example/lib
- lib/src
- test
- video_player
- video_player_android
- example
- integration_test
- lib
- lib/src
- test
- video_player_avfoundation
- example
- integration_test
- lib
- lib/src
- test
- video_player_platform_interface
- lib
- test
- video_player_web
- example/integration_test
- lib
- src
- video_player
- example/integration_test
- lib
- src
- test
- web_benchmarks
- example
- lib
- src
- testing/test_app/benchmark
- test_infra
- test/src
- webview_flutter
- webview_flutter_android
- example
- integration_test
- lib
- legacy
- lib/src
- legacy
- test
- legacy
- webview_flutter_platform_interface/test
- legacy
- platform_interface
- types
- webview_flutter_web
- example
- integration_test
- lib
- legacy
- lib/src
- test
- legacy
- webview_flutter_wkwebview
- example
- integration_test
- legacy
- lib
- legacy
- lib/src
- common
- legacy
- test
- legacy
- webview_flutter
- example
- integration_test
- lib
- lib/src/legacy
- test
- legacy
- xdg_directories
- lib
- test
- script/tool
- lib/src
- common
- test
- common
- third_party/packages
- cupertino_icons
- example
- test
- flutter_svg_test
- lib
- test
- flutter_svg
- example
- lib
- test_driver
- test
- mustache_template
- lib/src
- test
- path_parsing
- example
- lib/src
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,010 files changed
+38564
-36641
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
| 132 | + | |
132 | 133 | | |
133 | 134 | | |
134 | 135 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
193 | | - | |
| 196 | + | |
194 | 197 | | |
195 | 198 | | |
196 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
387 | | - | |
| 387 | + | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
682 | | - | |
683 | | - | |
| 682 | + | |
684 | 683 | | |
685 | 684 | | |
686 | 685 | | |
| |||
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
692 | | - | |
693 | | - | |
| 691 | + | |
| 692 | + | |
694 | 693 | | |
695 | 694 | | |
696 | 695 | | |
| |||
884 | 883 | | |
885 | 884 | | |
886 | 885 | | |
887 | | - | |
888 | | - | |
| 886 | + | |
| 887 | + | |
889 | 888 | | |
890 | 889 | | |
891 | 890 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
297 | | - | |
| 296 | + | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
| 376 | + | |
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
Lines changed: 18 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 13 | + | |
| 14 | + | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
| |||
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
| |||
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
119 | | - | |
120 | | - | |
121 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
122 | 118 | | |
123 | 119 | | |
124 | 120 | | |
| |||
206 | 202 | | |
207 | 203 | | |
208 | 204 | | |
209 | | - | |
210 | | - | |
211 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
212 | 208 | | |
213 | 209 | | |
214 | 210 | | |
| |||
271 | 267 | | |
272 | 268 | | |
273 | 269 | | |
274 | | - | |
275 | | - | |
276 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
277 | 273 | | |
278 | 274 | | |
279 | 275 | | |
| |||
358 | 354 | | |
359 | 355 | | |
360 | 356 | | |
361 | | - | |
| 357 | + | |
362 | 358 | | |
363 | 359 | | |
364 | 360 | | |
365 | | - | |
| 361 | + | |
366 | 362 | | |
367 | 363 | | |
368 | 364 | | |
| |||
431 | 427 | | |
432 | 428 | | |
433 | 429 | | |
434 | | - | |
| 430 | + | |
435 | 431 | | |
436 | 432 | | |
437 | 433 | | |
| |||
442 | 438 | | |
443 | 439 | | |
444 | 440 | | |
445 | | - | |
| 441 | + | |
446 | 442 | | |
447 | 443 | | |
448 | 444 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | | - | |
| 433 | + | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
| 476 | + | |
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
| 521 | + | |
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
532 | | - | |
| 532 | + | |
533 | 533 | | |
534 | 534 | | |
535 | 535 | | |
| |||
0 commit comments