Kate Lovett
9d96df2364
Modernize framework lints ( #179089 )
...
WIP
Commits separated as follows:
- Update lints in analysis_options files
- Run `dart fix --apply`
- Clean up leftover analysis issues
- Run `dart format .` in the right places.
Local analysis and testing passes. Checking CI now.
Part of https://github.com/flutter/flutter/issues/178827
- Adoption of flutter_lints in examples/api coming in a separate change
(cc @loic-sharma)
## Pre-launch Checklist
- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code ).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-11-26 01:10:39 +00:00
Ben Konyi
8c358779aa
[ Tool ] Fix run_linux_chrome_dev_mode ( #173647 )
...
It's possible for Chrome to open with two tabs pointing to localhost,
which was causing this test to fail. This change updates the Chrome
connection logic to look for the specific URL Chrome was told to
navigate to at launch, if one was provided.
2025-08-12 21:13:24 +00:00
Ben Konyi
c4ce6a8ef7
Reapply "Make device debuggable if useDwdsWebSocketConnection is true … ( #173551 )" ( #173628 )
...
This reverts commit
17c92b7ba6 .
Also added Chrome + `chromedriver` dependencies for the
`chrome_dev_mode` configurations.
2025-08-12 17:23:19 +00:00
auto-submit[bot]
17c92b7ba6
Reverts "Reapply "Make device debuggable if useDwdsWebSocketConnection is true … ( #173551 )" ( #173568 )" ( #173587 )
...
<!-- start_original_pr_link -->
Reverts: flutter/flutter#173568
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: bkonyi
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Chrome isn't configured for the test configuration
and is causing failures.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: bkonyi
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {jyameo, matanlurey}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
This reverts commit e2a347b14a18729dd24c2cf3240ef22562195e2d.
Previously reverted due to `*_chrome_dev_mode` tests failing on all
platforms.
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-08-11 22:15:48 +00:00
Ben Konyi
a9fc145a3d
Reapply "Make device debuggable if useDwdsWebSocketConnection is true … ( #173551 )" ( #173568 )
...
This reverts commit e2a347b14a18729dd24c2cf3240ef22562195e2d.
Previously reverted due to `*_chrome_dev_mode` tests failing on all
platforms.
2025-08-11 20:43:29 +00:00
Kate Lovett
a04fb324be
Bump Dart to 3.8 and reformat ( #171703 )
...
Bumps the Dart version to 3.8 across the repo (excluding
engine/src/flutter/third_party) and applies formatting updates from Dart
3.8.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-07-07 17:58:32 +00:00
MarkZ
2a3e27fdd9
Adding support for macrobenchmarking with "flutter run" ( #167692 )
...
Notable changes:
* Allows macrobenchmarks to run via `flutter run`.
* Splits macrobenchmarking between "orchestration logic" and "app
serving" (served on separate ports on the same machine to keep the
scheme consistent with the `flutter build` path).
* Adds an intercepted entrypoint for web benchmarks. We can't pass flags
to the app since it's not supported, so I've hard-coded the
orchestration server's port.
* Adding logic to connect to an existing Chrome debugger instance (vs
spawning one) for benchmarks.
2025-04-28 23:39:40 +00:00
Matan Lurey
d102e1197e
Remove references to cirrus, mostly in doc comments. ( #161529 )
...
Towards https://github.com/flutter/flutter/issues/161387 .
2025-01-13 23:49:04 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework ( #160545 )
...
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.
**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.
---------
Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Kallen Tu
9fd9f042fc
Add info strings to code blocks. ( #146085 )
...
In preparation to add the lint
`missing_code_block_language_in_doc_comment`, added info strings to a
bunch of fenced code blocks.
Related to issue: https://github.com/dart-lang/linter/issues/4904
## Pre-launch Checklist
- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel
on [Discord].
<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-04-01 14:05:16 -07:00
Nate
1a0dc8f1e1
Add missing parameter to TableBorder.symmetric, and improve class constructors ( #144279 )
...
Originally, my aim was just to refactor (as per usual), but while messing around with the `TableBorder.symmetric` constructor, I realized that `borderRadius` was missing!
This pull request makes a few class constructors more efficient, and it fixes #144277 by adding the missing parameter.
<br>
2024-03-04 20:20:19 +00:00
Nate
c53a18f4e4
Implementing null-aware operators throughout the repository ( #143804 )
...
This pull request fixes #143803 by taking advantage of Dart's null-aware operators.
And unlike `switch` expressions ([9 PRs](https://github.com/flutter/flutter/pull/143634 ) and counting), the Flutter codebase is already fantastic when it comes to null-aware coding. After refactoring the entire repo, all the changes involving `?.` and `??` can fit into a single pull request.
2024-02-23 19:02:22 +00:00
Jackson Gardner
d8b1e81c1f
Add --experimental-wasm-type-reflection and support newer emscripten builds. ( #133084 )
...
This makes two changes to prepare for incoming changes to skwasm in the web engine:
* We will (at least for now) be depending on the `WebAssembly.Function` constructor in `skwasm`, which is hidden behind the `--experimental-wasm-type-reflection` flag. We need to pass that when running skwasm benchmarks.
* We are going to be upgrading the skwasm build to a newer version of emscripten, which exposes the wasm exports via the `wasmExports` property instead of the `asm` property. Make sure to support either, if passed.
2023-08-23 17:07:41 +00:00
Jackson Gardner
1b887c72b5
Skwasm benchmarks. ( #129681 )
...
This enables benchmarks for the Skwasm renderer, compiled with
dart2wasm.
Platform views aren't supported in Skwasm yet, so we are skipping those
benchmarks for now.
2023-06-28 17:16:19 -07:00
Michael Goderbauer
ab3c82244e
Remove unnecessary null checks in dev/devicelab ( #118842 )
2023-01-20 18:56:44 +00:00
Alexandre Ardhuin
ccd33631e3
enable combinators_ordering ( #107847 )
2022-07-18 22:04:07 +00:00
Jenn Magder
c6ced845e3
Remove custom unawaited, prefer dart:async version ( #103212 )
2022-05-07 08:49:04 -07:00
Tomasz Gucio
e4351ff053
Enable use_if_null_to_convert_nulls_to_bools lint ( #98753 )
2022-02-22 14:39:20 -08:00
David Iglesias
93c0c043cf
[devicelab] Web benchmarks now run on Chromium 89+ ( #98629 )
2022-02-16 19:04:14 -08:00
Michael Goderbauer
5684b9f69e
Enable no_leading_underscores_for_local_identifiers ( #96422 )
2022-01-21 14:43:59 -08:00
Ian Hickson
f90b019c68
Enable prefer_relative_imports and fix files. ( #91573 )
2021-10-11 10:28:07 -07:00
Darren Austin
ef5ffd08f6
Migrate devicelab framework code to null safety. ( #86325 )
...
(Attempt to reland #85993 )
2021-07-13 12:14:50 -07:00
Darren Austin
08ef7752d5
Revert "Migrate core devicelab framework to null safety. ( #85993 )" ( #86269 )
...
This reverts commit 2175e64e4fdb387c5f01242c9a82779d3423e531.
2021-07-11 23:25:25 -07:00
Darren Austin
2175e64e4f
Migrate core devicelab framework to null safety. ( #85993 )
...
Migrate core devicelab framework to null safety.
2021-07-11 18:36:30 -07:00
Greg Spencer
88f3811055
Turn on avoid_dynamic_calls lint, except packages/flutter tests, make appropriate changes. ( #84476 )
...
This adds avoid_dynamic_calls to the list of lints, and fixes all instances where it was violated.
Importantly, this lint is NOT turned on for flutter/packages/test, because those changes are happening in another PR: #84478
2021-06-14 14:16:57 -07:00
Jenn Magder
94a41cde83
Mixed null safety in dev/devicelab ( #84017 )
2021-06-05 02:29:03 -07:00
Hattomo (TomohiroHattori)
08a70e7ac8
Enable avoid_escaping_inner_quotes lint ( #81153 )
2021-05-19 09:54:02 -07:00
gaaclarke
7cdd33fe99
added unawaited function for devicelab and turned on unawaited_futures linter ( #82833 )
2021-05-18 14:19:03 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations ( #80817 )
2021-04-21 13:49:03 -07:00
Yegor
e7953b3be4
[web] new service worker loading mechanism ( #75535 )
2021-02-11 09:16:21 -08:00
Yegor
7efd7afdf8
Handle the glibc bug that Chrome occasionally hits ( #71705 )
2020-12-04 12:21:37 -08:00
Jonah Williams
631087d83b
[flutter_tools] cache-bust in service worker ( #56786 )
2020-05-16 14:57:04 -07:00
Yegor
4e3cf198e8
disable tracing for non-frame based benchmarks ( #54236 )
2020-04-08 09:17:03 -07:00
Yegor
de27d7131c
disable the "gpu" tracing category ( #54122 )
2020-04-06 13:44:02 -07:00
Yegor
4b92c16755
Use "measured_frame" instead of "CrRendererMain" to detect process ID ( #53969 )
2020-04-03 16:51:44 -07:00
Yegor
29c88081b9
Collect chrome://tracing data in Web benchmarks ( #53879 )
...
Collect chrome://tracing data in Web benchmarks
2020-04-03 15:10:39 -07:00
Yegor
b34046903b
Fix stack trace parsing on non-debug builds; add e2e tests ( #50652 )
...
* Fix stack trace parsing on non-debug builds; add e2e tests
2020-02-13 18:34:08 -08:00