Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[tools] Validate code excerpt configuration #6286

Merged

Conversation

stuartmorgan-g
Copy link
Contributor

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

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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
Copy link
Contributor

@tarrinneal tarrinneal left a 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.

Copy link
Contributor

@bparrishMines bparrishMines left a 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';
Copy link
Contributor

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?

Copy link
Contributor Author

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:

https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#begin-global-constant-names-with-prefix-k

@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 26, 2022
@auto-submit auto-submit bot merged commit c5126a8 into flutter:main Aug 26, 2022
tarrinneal pushed a commit to tarrinneal/plugins that referenced this pull request Aug 26, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 29, 2022
tarrinneal added a commit that referenced this pull request Aug 29, 2022
* 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]>
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
* 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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plugins] Validate that readme excerpting is set up when the tags are found
3 participants