From f37ab4be5f419fef2e331a8d9b3c11fcfae4a2c2 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 29 Apr 2022 14:15:48 -0400 Subject: [PATCH 1/5] Roll repo tools --- .ci/scripts/prepare_tool.sh | 2 +- .github/workflows/release.yml | 2 +- packages/flutter_markdown/README.md | 4 ++-- third_party/packages/cupertino_icons/README.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ci/scripts/prepare_tool.sh b/.ci/scripts/prepare_tool.sh index dce7c98d476..cb3d64629df 100755 --- a/.ci/scripts/prepare_tool.sh +++ b/.ci/scripts/prepare_tool.sh @@ -8,4 +8,4 @@ git fetch origin master # Pinned version of the plugin tools, to avoid breakage in this repository # when pushing updates from flutter/plugins. -dart pub global activate flutter_plugin_tools 0.8.2+1 +dart pub global activate flutter_plugin_tools 0.8.4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0d3967e3576..8b71576f45f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: with: fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version. - name: Set up tools - run: dart pub global activate flutter_plugin_tools 0.8.2+1 + run: dart pub global activate flutter_plugin_tools 0.8.4 # # This workflow should be the last to run. So wait for all the other tests to succeed. - name: Wait on all tests diff --git a/packages/flutter_markdown/README.md b/packages/flutter_markdown/README.md index b6b3319d8db..36c8f5a29be 100644 --- a/packages/flutter_markdown/README.md +++ b/packages/flutter_markdown/README.md @@ -79,7 +79,7 @@ formatted output of the Markdown widget. For example, in the following Markdown widget constructor, a text string with a smiley face emoji is passed in as the source Markdown data. -``` +```dart Markdown( controller: controller, selectable: true, @@ -100,7 +100,7 @@ auto-links, and strike-through. To include the inline emoji tag syntax while maintaining the default GitHub flavored Markdown behavior, define an extension set that combines EmojiSyntax with ExtensionSet.gitHubFlavored. -``` +```dart import 'package:markdown/markdown.dart' as md; Markdown( diff --git a/third_party/packages/cupertino_icons/README.md b/third_party/packages/cupertino_icons/README.md index 2f86fe01c8b..df67ed07fbd 100644 --- a/third_party/packages/cupertino_icons/README.md +++ b/third_party/packages/cupertino_icons/README.md @@ -9,7 +9,7 @@ https://pub.dev/packages/cupertino_icons [![pub package](https://img.shields.io/pub/v/cupertino_icons.svg)](https://pub.dev/packages/cupertino_icons) -``` +```yaml dependencies: cupertino_icons: ^ ``` From 6e060c847861371e0f26e8a231c0d7f6432044c8 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 29 Apr 2022 14:21:36 -0400 Subject: [PATCH 2/5] Enable readme-check, including require-excerpt with opt-out file --- .cirrus.yml | 8 ++++++++ script/configs/temp_exclude_excerpt.yaml | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 script/configs/temp_exclude_excerpt.yaml diff --git a/.cirrus.yml b/.cirrus.yml index e6c5e3363b4..154e9100d8a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -59,6 +59,14 @@ task: license_script: dart pub global run flutter_plugin_tools license-check analyze_script: ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml pubspec_script: ./script/tool_runner.sh pubspec-check + readme_script: + - ./script/tool_runner.sh readme-check + # Re-run with --require-excerpts, skipping packages that still need + # to be converted. Once https://github.com/flutter/flutter/issues/102679 + # has been fixed, this can be removed and there can just be a single + # run with --require-excerpts and no exclusions. + - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml + # Does a sanity check that packages at least pass analysis on the N-1 and N-2 # versions of Flutter stable if the package claims to support that version. # This is to minimize accidentally making changes that break old versions diff --git a/script/configs/temp_exclude_excerpt.yaml b/script/configs/temp_exclude_excerpt.yaml new file mode 100644 index 00000000000..94aaaaf8038 --- /dev/null +++ b/script/configs/temp_exclude_excerpt.yaml @@ -0,0 +1,19 @@ +# Packages that have not yet adopted code-excerpt. +# +# This only exists to allow incrementally adopting the new requirement. +# Packages shoud never be added to this list. + +# TODO(ecosystem): Remove everything from this list. See +# https://github.com/flutter/flutter/issues/102679 +- cross_file +- css_colors +- extension_google_sign_in_as_googleapis_auth +- flutter_image +- flutter_markdown +- go_router +- go_router_builder +- multicast_dns +- palette_generator +- pigeon +- pointer_interceptor +- rfw From 37092eaacbd0974da805fa5e3264b9af48808c35 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 29 Apr 2022 14:22:17 -0400 Subject: [PATCH 3/5] add submodule --- .gitmodules | 3 +++ site-shared | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 site-shared diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..1d3bb5da1bf --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "site-shared"] + path = site-shared + url = https://github.com/dart-lang/site-shared diff --git a/site-shared b/site-shared new file mode 160000 index 00000000000..8c92e5bdfdc --- /dev/null +++ b/site-shared @@ -0,0 +1 @@ +Subproject commit 8c92e5bdfdce14887605de6b5d9d0bd2615876b7 From 1c35e95ff4a2b74a701aa58eaaa982db846d2adb Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Fri, 29 Apr 2022 14:29:24 -0400 Subject: [PATCH 4/5] Add excerpt CI step --- .cirrus.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 154e9100d8a..8f8c15437fe 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -66,6 +66,10 @@ task: # has been fixed, this can be removed and there can just be a single # run with --require-excerpts and no exclusions. - ./script/tool_runner.sh readme-check --require-excerpts --exclude=script/configs/temp_exclude_excerpt.yaml + - name: readme_excerpts + env: + CIRRUS_CLONE_SUBMODULES: true + script: ./script/tool_runner.sh update-excerpts --fail-on-change # Does a sanity check that packages at least pass analysis on the N-1 and N-2 # versions of Flutter stable if the package claims to support that version. From b9e795b73480c4ce05377d0c061bc2bc1ca9e64b Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Fri, 29 Apr 2022 16:39:35 -0700 Subject: [PATCH 5/5] Fix TODO --- script/configs/temp_exclude_excerpt.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/configs/temp_exclude_excerpt.yaml b/script/configs/temp_exclude_excerpt.yaml index 94aaaaf8038..4d1258f3280 100644 --- a/script/configs/temp_exclude_excerpt.yaml +++ b/script/configs/temp_exclude_excerpt.yaml @@ -3,7 +3,7 @@ # This only exists to allow incrementally adopting the new requirement. # Packages shoud never be added to this list. -# TODO(ecosystem): Remove everything from this list. See +# TODO(stuartmorgan): Remove everything from this list. See # https://github.com/flutter/flutter/issues/102679 - cross_file - css_colors