Skip to content

Make windowing_test follow repo analyzer rules#184752

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
goderbauer:analyzeWindowingTest
Apr 9, 2026
Merged

Make windowing_test follow repo analyzer rules#184752
auto-submit[bot] merged 2 commits into
flutter:masterfrom
goderbauer:analyzeWindowingTest

Conversation

@goderbauer

Copy link
Copy Markdown
Member

The windowing_test had an empty analysis_options.yaml file checked in that disabled the top-level analysis_options.yaml file and with it the repo-wide rule set. As far as I can tell, there isn't a good reason why the repo rules shouldn't apply here. This PR deletes the custom analysis_options.yaml file and makes the code adhere to the top-level rule set. Any violations were fixed by Gemini.

@goderbauer goderbauer added the CICD Run CI/CD label Apr 8, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the windowing integration tests by introducing const modifiers, improving type safety in JSON handling, and updating local variable declarations. The review feedback recommends using num for safer JSON numeric casting to double, consistently using Map<String, Object?> for decoded JSON, and adhering to the omit_local_variable_types style guideline by removing explicit types for local variables that were added or changed in this PR.

Comment thread dev/integration_tests/windowing_test/lib/main.dart Outdated
Comment thread dev/integration_tests/windowing_test/lib/main.dart Outdated
);
// We assume that this will cause a resize, which the current tests do.
final initialSize = controller.contentSize;
final Size initialSize = controller.contentSize;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Local variable types should be omitted when they can be inferred, following the repository's analysis rules (specifically the omit_local_variable_types lint) and Effective Dart guidelines.

Suggested change
final Size initialSize = controller.contentSize;
final initialSize = controller.contentSize;
References
  1. Effective Dart: Style - DO omit types for local variables. (link)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this triggers the specify_nonobvious_local_variable_types lint.

Comment thread dev/integration_tests/windowing_test/test_driver/main_test.dart Outdated
jsonEncode({'type': 'set_title', 'title': 'Hello World'}),
);
final response = await _requestDataWithRetry(
final String response = await _requestDataWithRetry(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Omit the explicit String type for this local variable to adhere to the omit_local_variable_types lint rule being applied in this PR.

Suggested change
final String response = await _requestDataWithRetry(
final response = await _requestDataWithRetry(
References
  1. Effective Dart: Style - DO omit types for local variables. (link)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this triggers the specify_nonobvious_local_variable_types lint.

);
var data = jsonDecode(response);
await _requestDataWithRetry(driver, jsonEncode({'type': 'set_fullscreen'}));
String response = await _requestDataWithRetry(driver, jsonEncode({'type': 'get_fullscreen'}));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Use var instead of an explicit type for local variables that are reassigned, in accordance with the omit_local_variable_types lint.

Suggested change
String response = await _requestDataWithRetry(driver, jsonEncode({'type': 'get_fullscreen'}));
var response = await _requestDataWithRetry(driver, jsonEncode({'type': 'get_fullscreen'}));
References
  1. Effective Dart: Style - DO omit types for local variables. (link)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this triggers the specify_nonobvious_local_variable_types lint.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 8, 2026
@goderbauer goderbauer added the CICD Run CI/CD label Apr 8, 2026
@goderbauer goderbauer requested a review from loic-sharma April 8, 2026 09:00

@loic-sharma loic-sharma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning this up!

@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 9, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Apr 9, 2026
Merged via the queue into flutter:master with commit d996d16 Apr 9, 2026
163 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 9, 2026
@goderbauer goderbauer deleted the analyzeWindowingTest branch April 9, 2026 09:49
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 9, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 9, 2026
flutter/flutter@05e0ae0...81c87ea

2026-04-09 [email protected] Remove last material dependency from cupertino tests (flutter/flutter#184781)
2026-04-09 [email protected] Roll Skia from 7c46cb639dba to 4d0f5389e131 (7 revisions) (flutter/flutter#184812)
2026-04-09 [email protected] Make `windowing_test` follow repo analyzer rules (flutter/flutter#184752)
2026-04-09 [email protected] Improve documentation of `frictionFactor` function (flutter/flutter#184509)
2026-04-09 [email protected] Roll Skia from d2b0bd12576a to 7c46cb639dba (1 revision) (flutter/flutter#184796)
2026-04-09 [email protected] Roll Fuchsia GN SDK from JLBh4Z9PKsjIJcqDU... to SEfYx3xgueX3aFAY3... (flutter/flutter#184797)
2026-04-09 [email protected] Fixed freeze flow (flutter/flutter#184793)
2026-04-09 [email protected] Roll pub packages (flutter/flutter#184795)
2026-04-09 [email protected] Roll Skia from e9ed4fc9f154 to d2b0bd12576a (36 revisions) (flutter/flutter#184791)
2026-04-08 [email protected] [Android] Allow sensitive content to gracefully fail when unregistering host before registering (flutter/flutter#184789)
2026-04-08 [email protected] Refactor: remove material from autocomplete_test, scrollable_restoration_test, semantics_tester_generate_test_semantics_expression_for_current_semantics_tree_test (flutter/flutter#184615)
2026-04-08 [email protected] Warn about the use of TestSemantics (flutter/flutter#184369)
2026-04-08 [email protected] Change freeze flow to pull_request_target (flutter/flutter#184785)
2026-04-08 [email protected] Update to the beta dart version for 3.44 branch cut.  (flutter/flutter#184770)
2026-04-08 [email protected] [Dot shorthands] Migrate examples/api/test (flutter/flutter#183966)
2026-04-08 [email protected] [fuchsia] Give AOT runners the ability to copy FFI callback thunks. (flutter/flutter#184696)
2026-04-08 [email protected] Add await or ignore lint to invokeMethod callsites (flutter/flutter#182870)
2026-04-08 [email protected] Correctly handle failure to read /proc/self/exe link (flutter/flutter#184700)
2026-04-08 [email protected] Roll Skia from e264d870a380 to e9ed4fc9f154 (11 revisions) (flutter/flutter#184713)
2026-04-08 [email protected] Roll Packages from 5299279 to 0e0a032 (5 revisions) (flutter/flutter#184720)
2026-04-08 [email protected] Roll pub packages (flutter/flutter#184772)
2026-04-08 [email protected] Roll Fuchsia Linux SDK from 1rcChbOv4nSTVkUxs... to pDXMXRIjEHTw7B0sk... (flutter/flutter#184722)
2026-04-08 [email protected] Remove navigator_utils cross-imports from cupertino tests (flutter/flutter#184282)
2026-04-08 [email protected] Even more awaits v2 (flutter/flutter#184552)
2026-04-08 [email protected] Allow personal skills to be gitignored (flutter/flutter#184727)
2026-04-08 [email protected] [ci] mac_arm64 build_test re-enable shard 1 presubmit (flutter/flutter#184751)
2026-04-08 [email protected] Fix repo check on code freeze (flutter/flutter#184771)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
The `windowing_test` had an empty `analysis_options.yaml` file checked
in that disabled the top-level analysis_options.yaml file and with it
the repo-wide rule set. As far as I can tell, there isn't a good reason
why the repo rules shouldn't apply here. This PR deletes the custom
`analysis_options.yaml` file and makes the code adhere to the top-level
rule set. Any violations were fixed by Gemini.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants