Skip to content

Support example code extraction for flutter/plugins and flutter/packages #89987

@stuartmorgan-g

Description

@stuartmorgan-g

We've had issues with example code in README.md files for our packages becoming very stale (e.g., never being updated after NNBD migration, and thus not even compiling). pub.dev has an "Example" tab that shows the main code from the example/ directory, but that's often a lot of code, especially since we use it for integration tests.

We can use
https://github.com/chalin/code_excerpter
https://github.com/chalin/code_excerpt_updater
(used by other Flutter repositories) to extract sections from our examples into the READMEs. To ensure that they stay up to date, we would need to add a command to the repo tool similar to format, which would run generation and ensure that nothing has changed, and if it has dumping a diff to the console for ease of updating.

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listp: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions