Skip to content

Sync analysis_options.yaml with flutter/flutter#11823

Merged
auto-submit[bot] merged 10 commits into
flutter:mainfrom
stuartmorgan-g:ananlysis-sync-flutter-2026-05-11
Jun 4, 2026
Merged

Sync analysis_options.yaml with flutter/flutter#11823
auto-submit[bot] merged 10 commits into
flutter:mainfrom
stuartmorgan-g:ananlysis-sync-flutter-2026-05-11

Conversation

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Pulls in changes from flutter/flutter's analysis_options.yaml since the last since at the end of 2023.

@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 updates the analysis_options.yaml configuration to align with a newer version of the Flutter repository, enabling several linter rules including avoid_final_parameters and unnecessary_underscores. To comply with these new rules, the changes replace multi-underscore unused parameters with single underscores and remove the final keyword from parameter declarations across multiple packages. There are no review comments to address, and no additional feedback is provided.

@justinmc justinmc 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.

LGTM 👍 . Thank you for the help here!

@justinmc

justinmc commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Looks like there's still some analyzer errors:

   info - lib/src/common/pub_version_finder.dart:54:12 - Parameters should not be marked as 'final'. Try removing the keyword 'final'. - avoid_final_parameters
   info - lib/src/fetch_deps_command.dart:290:5 - Parameters should not be marked as 'final'. Try removing the keyword 'final'. - avoid_final_parameters
   info - test/common/output_utils_test.dart:99:16 - Unnecessary use of multiple underscores. Try using '_'. - unnecessary_underscores
   info - test/common/output_utils_test.dart:99:20 - Unnecessary use of multiple underscores. Try using '_'. - unnecessary_underscores
   info - test/license_check_command_test.dart:477:11 - Don't use adjacent strings in a list literal. Try adding a comma between the strings. - no_adjacent_strings_in_list
   info - test/util.dart:366:16 - Unnecessary use of multiple underscores. Try using '_'. - unnecessary_underscores
   info - test/util.dart:366:20 - Unnecessary use of multiple underscores. Try using '_'. - unnecessary_underscores

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 2, 2026
@Piinks Piinks added the CICD Run CI/CD label Jun 2, 2026
@stuartmorgan-g stuartmorgan-g added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes labels Jun 3, 2026
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator Author

Version/changelog override: the source changes here are clearly no-ops for runtime behavior, so we'll skip releasing for this, and they aren't interesting to clients so don't need to be in the changelog.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator Author

(I know this is currently failing the autoformat check; I didn't bother formatting since I want to land #11692 first and then update this, rather than landing this first and causing conflicts there that require yet another round of reformatting the entire repo.)

stuartmorgan-g added a commit to flutter/core-packages that referenced this pull request Jun 3, 2026
Re-syncs the analysis options from flutter/packages to pick up
flutter/packages#11692 and
flutter/packages#11823

- Runs `format` for the 100-column limit
- Runs `fix` to auto-fix a couple of `final` parameters.

No manual changes other than `analysis_options.yaml` itself.
@justinmc

justinmc commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Looks like a single analyzer failure:

   info - test/license_check_command_test.dart:427:11 - Don't use adjacent strings in a list literal. Try adding a comma between the strings. - no_adjacent_strings_in_list

And a test failure in the pigeon package. I don't know what that's about.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 4, 2026
@stuartmorgan-g stuartmorgan-g added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Jun 4, 2026
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator Author

The pigeon failure is a known flake, unrelated to the PR.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 4, 2026
@auto-submit

auto-submit Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/packages/11823, because - The status or check suite Linux repo_checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 4, 2026
@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Jun 4, 2026
@justinmc

justinmc commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

I just re-ran the failed test. It was happening in a package that was not touched by this PR. Not sure if it's a flake but worth a shot.

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8679925651609296113/+/u/Run_package_tests/drive_examples/stdout

The following PathNotFoundException was thrown running a test:
Cannot open file, path =
'/Users/chrome-bot/Library/Caches/dev.flutter.plugins.pathProviderExample/temporaryDirectory' (OS
Error: No such file or directory, errno = 2)

When the exception was thrown, this was the stack:
#0      _File.throwIfError (dart:io/file_impl.dart:779:7)
#1      _File.openSync (dart:io/file_impl.dart:572:5)
#2      _File.writeAsBytesSync (dart:io/file_impl.dart:744:31)
#3      _File.writeAsStringSync (dart:io/file_impl.dart:772:5)
#4      _verifySampleFile (file:///Volumes/Work/s/w/ir/x/w/packages/packages/path_provider/path_provider/example/integration_test/path_provider_test.dart:124:8)
#5      main.<anonymous closure> (file:///Volumes/Work/s/w/ir/x/w/packages/packages/path_provider/path_provider/example/integration_test/path_provider_test.dart:15:5)
<asynchronous suspension>
#6      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:192:15)
<asynchronous suspension>
#7      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1953:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

The test description was:
  getTemporaryDirectory

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator Author

Yeah, I've run it several times. Same with another PR I have open right now. I filed flutter/flutter#187563 this morning, and I am about to start seeing if I can fix it.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 4, 2026
@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Jun 4, 2026
@stuartmorgan-g

Copy link
Copy Markdown
Collaborator Author

Seems like #11841 did the trick 🎉

@auto-submit auto-submit Bot merged commit c869a5d into flutter:main Jun 4, 2026
87 checks passed
@justinmc

justinmc commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Great, I'm updating #11669!

@stuartmorgan-g stuartmorgan-g deleted the ananlysis-sync-flutter-2026-05-11 branch June 4, 2026 20:46
tamirenkhbayar3-cmd pushed a commit to tamirenkhbayar3-cmd/flutter that referenced this pull request Jun 5, 2026
…r#187612)

flutter/packages@03352b5...61bdbb4

2026-06-04 stuartmorgan@google.com [tool] Use `flutter` for pub commands
when examples use Flutter (flutter/packages#11830)
2026-06-04 stuartmorgan@google.com Sync analysis_options.yaml with
flutter/flutter (flutter/packages#11823)
2026-06-04 stuartmorgan@google.com [path_provider] Create temp dir in
tests if needed (flutter/packages#11841)
2026-06-04 jeff.ward@datadoghq.com [webview] Add new method for cross
plugin webview access (flutter/packages#11714)
2026-06-04 47866232+chunhtai@users.noreply.github.com [ci] Renames the
override post-release label for batch release (flutter/packages#11835)

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-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
Pulls in changes from flutter/flutter's analysis_options.yaml since the last since at the end of 2023.
- `invalid_runtime_check_with_js_interop_types` is disabled for now; see flutter/flutter#187454
- `dart fix --apply` has been run on all packages, which auto-fixed a lot of cases of `unnecessary_underscores`, and a handful of `avoid_final_parameters`
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…r#187612)

flutter/packages@03352b5...61bdbb4

2026-06-04 stuartmorgan@google.com [tool] Use `flutter` for pub commands
when examples use Flutter (flutter/packages#11830)
2026-06-04 stuartmorgan@google.com Sync analysis_options.yaml with
flutter/flutter (flutter/packages#11823)
2026-06-04 stuartmorgan@google.com [path_provider] Create temp dir in
tests if needed (flutter/packages#11841)
2026-06-04 jeff.ward@datadoghq.com [webview] Add new method for cross
plugin webview access (flutter/packages#11714)
2026-06-04 47866232+chunhtai@users.noreply.github.com [ci] Renames the
override post-release label for batch release (flutter/packages#11835)

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-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: cross_file p: go_router p: google_fonts p: google_maps_flutter p: image_picker p: interactive_media_ads Plugin for IMA SDK p: metrics_center p: pigeon p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package p: url_launcher p: web_benchmarks p: webview_flutter platform-android platform-ios platform-web triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants