-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[tools] Validate code excerpt configuration #6286
[tools] Validate code excerpt configuration #6286
Conversation
Ensures that if a REAME uses code excerpting, the package is configured to drive it. This avoids the (so far common) mistake of adding tags when the block check fails, but not setting up the package so that they actually work. Also adds a link to the wiki for the missing excerpt tag error so that people find the instructions sooner, rather than adding tags via guess-and-check. Fixes flutter/flutter#109231
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, this looks good. I'll let bparrishMines give the approval, since I'm still not sure I know what all to check for.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// This is a shared constant to ensure that both readme-check and | ||
// update-excerpt are looking for the same file, so that readme-check can't | ||
// get out of sync with what actually drives excerpting. | ||
const String kReadmeExcerptConfigPath = 'example/build.excerpt.yaml'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I don't think we typically start constants with a k
in Dart. I'm assuming this the pattern for this package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I learned recently that the Flutter style guide disagrees with Dart style on this for global constants:
* Endorse ios and update examples * [gh_actions]: Bump lewagon/wait-on-check-action from 1.1.1 to 1.1.2 (#6300) * [gh_actions]: Bump github/codeql-action from 2.1.18 to 2.1.19 (#6299) * [gh_actions]: Bump ossf/scorecard-action from 1.1.1 to 1.1.2 (#6071) * Roll Flutter from abfba69 to 6d3f782 (74 revisions) (#6314) * [gh_actions]: Bump actions/labeler from 4.0.0 to 4.0.1 (#6262) * Roll Flutter from 6d3f782 to 000b96c (13 revisions) (#6317) * Adds info about commands requiring Flutter-bundled dart (#6312) * [tools] Validate code excerpt configuration (#6286) * temp lower ios version number * Update README supported table * remove unused routes * lower version num * iOS vs ios * todo * don't ignore ios * add ios files * add license block * fix Uint8 error * relocate import * Exclude ios integration test for file_selector * fix requests Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: engine-flutter-autoroll <[email protected]> Co-authored-by: stuartmorgan <[email protected]> Co-authored-by: Tarrin Neal <[email protected]>
* Endorse ios and update examples * [gh_actions]: Bump lewagon/wait-on-check-action from 1.1.1 to 1.1.2 (flutter#6300) * [gh_actions]: Bump github/codeql-action from 2.1.18 to 2.1.19 (flutter#6299) * [gh_actions]: Bump ossf/scorecard-action from 1.1.1 to 1.1.2 (flutter#6071) * Roll Flutter from abfba69 to 6d3f782 (74 revisions) (flutter#6314) * [gh_actions]: Bump actions/labeler from 4.0.0 to 4.0.1 (flutter#6262) * Roll Flutter from 6d3f782 to 000b96c (13 revisions) (flutter#6317) * Adds info about commands requiring Flutter-bundled dart (flutter#6312) * [tools] Validate code excerpt configuration (flutter#6286) * temp lower ios version number * Update README supported table * remove unused routes * lower version num * iOS vs ios * todo * don't ignore ios * add ios files * add license block * fix Uint8 error * relocate import * Exclude ios integration test for file_selector * fix requests Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: engine-flutter-autoroll <[email protected]> Co-authored-by: stuartmorgan <[email protected]> Co-authored-by: Tarrin Neal <[email protected]>
Ensures that if a REAME uses code excerpting, the package is configured
to drive it. This avoids the (so far common) mistake of adding tags when
the block check fails, but not setting up the package so that they
actually work.
Also adds a link to the wiki for the missing excerpt tag error so that
people find the instructions sooner, rather than adding tags via
guess-and-check.
Fixes flutter/flutter#109231
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).