Skip to content

[infra] Toplevel analysis options#3084

Merged
dcharkes merged 1 commit intomainfrom
toplevel-analysis-options
Feb 12, 2026
Merged

[infra] Toplevel analysis options#3084
dcharkes merged 1 commit intomainfrom
toplevel-analysis-options

Conversation

@dcharkes
Copy link
Collaborator

Analyzer plugins need to be defined in the toplevel analysis options, we don't have one yet.

@dcharkes dcharkes requested a review from goderbauer February 11, 2026 15:14
@goderbauer
Copy link
Contributor

For my own understanding: How will this work? You define the analyzer plugins in your top-level pubspec and then they automatically apply to sub-packages as well? Or do the sub-packages have to import the top-level pubspec? If so, how does that work on pub when these packages are analyzes without the workspace present?

@@ -0,0 +1 @@
include: package:dart_flutter_team_lints/analysis_options.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

How is this resolved? I would have expected that we'd need an entry for this in the top-level pubspec?

tool/ci.dart Outdated
'pkgs/hooks_runner',
'pkgs/native_toolchain_c',
];
const slowTestPackages = ['pkgs/hooks_runner', 'pkgs/native_toolchain_c'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! You need to add the following to the analysis_options to preserve trailing commas and avoid this reformat:

formatter:
  trailing_commas: preserve

@dcharkes
Copy link
Collaborator Author

You define the analyzer plugins in your top-level pubspec and then they automatically apply to sub-packages as well?

I believe so. You can't add them to nested ones, that gives an error.

FYI: I abandoned analyzer plugins for now. But I still think it could make sense to land this analysis options to govern the tool directory.

Base automatically changed from pub-formats-analysis-options to main February 12, 2026 10:11
@dcharkes dcharkes force-pushed the toplevel-analysis-options branch 2 times, most recently from 0aa3a26 to 9456e73 Compare February 12, 2026 11:38
@dcharkes dcharkes changed the base branch from main to tool-format February 12, 2026 11:38
Copy link
Contributor

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from tool-format to main February 12, 2026 12:08
@dcharkes dcharkes force-pushed the toplevel-analysis-options branch from 9456e73 to 53f61a6 Compare February 12, 2026 12:09
@dcharkes dcharkes merged commit 6b1dfa7 into main Feb 12, 2026
14 checks passed
@dcharkes dcharkes deleted the toplevel-analysis-options branch February 12, 2026 12:14
@coveralls
Copy link

Coverage Status

coverage: 74.172%. first build
when pulling 53f61a6 on toplevel-analysis-options
into ed8075b on main.

Hassnaa9 pushed a commit to Hassnaa9/native that referenced this pull request Feb 13, 2026
Cairo09 pushed a commit to Cairo09/native that referenced this pull request Feb 13, 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.

3 participants