Skip to content

[tool] Switch custom analysis allowance to local config#12088

Open
stuartmorgan-g wants to merge 3 commits into
flutter:mainfrom
stuartmorgan-g:custom-analysis-local-config
Open

[tool] Switch custom analysis allowance to local config#12088
stuartmorgan-g wants to merge 3 commits into
flutter:mainfrom
stuartmorgan-g:custom-analysis-local-config

Conversation

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

Switches from a global allow-list for custom analysis options to the new package-local config system. This eliminates the need for a global file change to adjust the setting for a single package, which makes CI much faster for such changes, without eliminating the desired feature of requiring devs to explicitly opt in to using a custom analysis options file (vs. adding one accidentally, or adding one without realizing there's a general policy against doing so).

The legacy flag is preserved, but ignored, so as not to break the flutter/flutter and dart-lang/sdk scripts that run analysis on our repo (to pre-detect issue that would block the roller). Once this lands I can update those scripts, then remove the flag.

@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 deprecates the --custom-analysis command-line argument in the analyze tool in favor of a package-level configuration. It introduces the allow_custom_analysis_options property in ci_config.yaml files, allowing individual packages to opt-in to custom analysis options. The global custom analysis configuration file has been removed, and the analyze scripts, tool implementation, and tests have been updated accordingly. I have no feedback to provide.

Comment on lines +32 to +33
// TODO(stuartmorgan): Remove this entirely once the flutter/flutter and dart-lang repo scripts
// that run flutter/packages analysis have been updated not to pass it.

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.

Is there an issue for this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, but it's a simple change I'll do once this lands.

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 1, 2026
@github-actions github-actions Bot added p: camera and removed CICD Run CI/CD labels Jul 1, 2026
@auto-submit

auto-submit Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants