From 79f8b0b6655132ac8d11a50243afe85867a09405 Mon Sep 17 00:00:00 2001 From: Kallen Tu Date: Mon, 4 Nov 2024 14:24:38 -0800 Subject: [PATCH] [various] Add `missing_code_block_language_in_doc_comment` lint to flutter/packages. (#6473) Adds this Dartdoc-related lint to the flutter repository, in replacement of the Dartdoc warning (missingCodeBlockLanguage) because it will be deprecated and removed soon. flutter/flutter already has this lint as well. Adding to flutter/engine with https://github.com/flutter/engine/pull/51944. Lint Proposal: https://github.com/dart-lang/linter/issues/4904 Issue covering future work removing the `// ignore:`s: https://github.com/flutter/flutter/issues/157620 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [relevant style guides] and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use `dart format`.) - [x] I signed the [CLA]. - [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g. `[shared_preferences]` - [x] I [linked to at least one issue that this PR fixes] in the description above. - [x] I updated `pubspec.yaml` with an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes]. - [x] I updated `CHANGELOG.md` to add a description of the change, [following repository CHANGELOG style]. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [relevant style guides]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat [linked to at least one issue that this PR fixes]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [pub versioning philosophy]: https://dart.dev/tools/pub/versioning [exempt from version changes]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates [following repository CHANGELOG style]: https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests --- analysis_options.yaml | 1 + packages/flutter_migrate/CHANGELOG.md | 3 +- .../flutter_migrate/lib/src/base/common.dart | 4 +- .../flutter_migrate/lib/src/base/logger.dart | 2 +- packages/flutter_migrate/pubspec.yaml | 2 +- packages/go_router/CHANGELOG.md | 4 ++ packages/go_router/lib/src/route.dart | 37 +++++++------ packages/go_router/lib/src/state.dart | 2 +- packages/go_router/pubspec.yaml | 2 +- .../google_sign_in/CHANGELOG.md | 3 +- .../google_sign_in/lib/testing.dart | 2 +- .../google_sign_in/pubspec.yaml | 2 +- packages/process/CHANGELOG.md | 3 +- .../lib/src/interface/process_manager.dart | 24 +++++---- packages/process/pubspec.yaml | 2 +- packages/rfw/CHANGELOG.md | 3 +- packages/rfw/lib/src/dart/binary.dart | 42 +++++++++------ packages/rfw/lib/src/dart/text.dart | 52 +++++++++---------- .../rfw/lib/src/flutter/material_widgets.dart | 6 +++ packages/rfw/pubspec.yaml | 2 +- packages/web_benchmarks/CHANGELOG.md | 4 ++ packages/web_benchmarks/lib/src/browser.dart | 2 +- packages/web_benchmarks/lib/src/recorder.dart | 6 +-- packages/web_benchmarks/pubspec.yaml | 2 +- .../webview_flutter_android/CHANGELOG.md | 4 ++ .../lib/src/weak_reference_utils.dart | 2 +- .../webview_flutter_android/pubspec.yaml | 2 +- .../webview_flutter_web/CHANGELOG.md | 3 +- .../lib/src/http_request_factory.dart | 28 +++++----- .../webview_flutter_web/pubspec.yaml | 2 +- .../webview_flutter_wkwebview/CHANGELOG.md | 4 ++ .../lib/src/common/weak_reference_utils.dart | 2 +- .../webview_flutter_wkwebview/pubspec.yaml | 2 +- .../lib/src/update_release_info_command.dart | 2 +- third_party/packages/flutter_svg/CHANGELOG.md | 4 ++ third_party/packages/flutter_svg/lib/svg.dart | 2 +- third_party/packages/flutter_svg/pubspec.yaml | 2 +- 37 files changed, 163 insertions(+), 108 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 496ddf31bf76..736235588ba5 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -111,6 +111,7 @@ linter: # - lines_longer_than_80_chars # not required by flutter style - literal_only_boolean_expressions # - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509 + - missing_code_block_language_in_doc_comment - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_default_cases diff --git a/packages/flutter_migrate/CHANGELOG.md b/packages/flutter_migrate/CHANGELOG.md index 19b1800df246..2d132e53fc13 100644 --- a/packages/flutter_migrate/CHANGELOG.md +++ b/packages/flutter_migrate/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 0.0.1+4 +* Adds `missing_code_block_language_in_doc_comment` lint. * Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. ## 0.0.1+3 diff --git a/packages/flutter_migrate/lib/src/base/common.dart b/packages/flutter_migrate/lib/src/base/common.dart index 6612e3a30ee0..1bf38431b523 100644 --- a/packages/flutter_migrate/lib/src/base/common.dart +++ b/packages/flutter_migrate/lib/src/base/common.dart @@ -63,7 +63,7 @@ String getEnumName(dynamic enumItem) { /// Rationale: /// /// Consider the following snippet: -/// ``` +/// ```dart /// try { /// await foo(); /// ... @@ -87,7 +87,7 @@ String getEnumName(dynamic enumItem) { /// [asyncGuard] is intended to wrap awaited expressions occurring in a `try` /// block. The behavior described above gives the behavior that users /// intuitively expect from `await`. Consider the snippet: -/// ``` +/// ```dart /// try { /// await asyncGuard(() async { /// var c = Completer(); diff --git a/packages/flutter_migrate/lib/src/base/logger.dart b/packages/flutter_migrate/lib/src/base/logger.dart index 70ff228a3901..92ba372c611a 100644 --- a/packages/flutter_migrate/lib/src/base/logger.dart +++ b/packages/flutter_migrate/lib/src/base/logger.dart @@ -1125,7 +1125,7 @@ class SpinnerStatus extends AnonymousSpinnerStatus { /// ``` /// /// yields: -/// ``` +/// ```none /// Usage: app main_command /// [arguments] /// ``` diff --git a/packages/flutter_migrate/pubspec.yaml b/packages/flutter_migrate/pubspec.yaml index 5eae9bd21ba8..f1aafdf48cf0 100644 --- a/packages/flutter_migrate/pubspec.yaml +++ b/packages/flutter_migrate/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_migrate description: A tool to migrate legacy flutter projects to modern versions. -version: 0.0.1+3 +version: 0.0.1+4 repository: https://github.com/flutter/packages/tree/main/packages/flutter_migrate issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Ap%3A%20flutter_migrate publish_to: none diff --git a/packages/go_router/CHANGELOG.md b/packages/go_router/CHANGELOG.md index 65807f91f5be..78abc879a9e9 100644 --- a/packages/go_router/CHANGELOG.md +++ b/packages/go_router/CHANGELOG.md @@ -1,3 +1,7 @@ +## 14.4.1 + +- Adds `missing_code_block_language_in_doc_comment` lint. + ## 14.4.0 - Adds current state getter on `GoRouter` that returns the current `GoRouterState`. diff --git a/packages/go_router/lib/src/route.dart b/packages/go_router/lib/src/route.dart index 6fa9b8bb7489..a5dcc734d054 100644 --- a/packages/go_router/lib/src/route.dart +++ b/packages/go_router/lib/src/route.dart @@ -77,7 +77,7 @@ typedef ExitCallback = FutureOr Function( /// with the sub routes. /// /// For example these routes: -/// ``` +/// ```none /// / => HomePage() /// family/f1 => FamilyPage('f1') /// person/p2 => PersonPage('f1', 'p2') ← showing this page, Back pops ↑ @@ -85,7 +85,7 @@ typedef ExitCallback = FutureOr Function( /// /// Can be represented as: /// -/// ``` +/// ```dart /// final GoRouter _router = GoRouter( /// routes: [ /// GoRoute( @@ -122,12 +122,14 @@ typedef ExitCallback = FutureOr Function( /// ), /// ], /// ); +/// ``` /// /// If there are multiple routes that match the location, the first match is used. /// To make predefined routes to take precedence over dynamic routes eg. '/:id' -/// consider adding the dynamic route at the end of the routes +/// consider adding the dynamic route at the end of the routes. +/// /// For example: -/// ``` +/// ```dart /// final GoRouter _router = GoRouter( /// routes: [ /// GoRoute( @@ -145,9 +147,10 @@ typedef ExitCallback = FutureOr Function( /// ], /// ); /// ``` -/// In the above example, if /family route is matched, it will be used. -/// else /:username route will be used. -/// /// +/// +/// In the above example, if `/family` route is matched, it will be used. +/// else `/:username` route will be used. +/// /// See [main.dart](https://github.com/flutter/packages/blob/main/packages/go_router/example/lib/main.dart) @immutable abstract class RouteBase with Diagnosticable { @@ -164,7 +167,7 @@ abstract class RouteBase with Diagnosticable { /// the GoRoute constructor. /// /// For example: - /// ``` + /// ```dart /// final GoRouter _router = GoRouter( /// routes: [ /// GoRoute( @@ -183,7 +186,7 @@ abstract class RouteBase with Diagnosticable { /// redirect takes priority over sub-route's. /// /// For example: - /// ``` + /// ```dart /// final GoRouter _router = GoRouter( /// routes: [ /// GoRoute( @@ -327,7 +330,7 @@ class GoRoute extends RouteBase { /// The path of this go route. /// /// For example: - /// ``` + /// ```dart /// GoRoute( /// path: '/', /// pageBuilder: (BuildContext context, GoRouterState state) => MaterialPage( @@ -352,7 +355,7 @@ class GoRoute extends RouteBase { /// A page builder for this route. /// /// Typically a MaterialPage, as in: - /// ``` + /// ```dart /// GoRoute( /// path: '/', /// pageBuilder: (BuildContext context, GoRouterState state) => MaterialPage( @@ -369,7 +372,7 @@ class GoRoute extends RouteBase { /// A custom builder for this route. /// /// For example: - /// ``` + /// ```dart /// GoRoute( /// path: '/', /// builder: (BuildContext context, GoRouterState state) => FamilyPage( @@ -391,7 +394,7 @@ class GoRoute extends RouteBase { /// This method can be useful it one wants to launch a dialog for user to /// confirm if they want to exit the screen. /// - /// ``` + /// ```dart /// final GoRouter _router = GoRouter( /// routes: [ /// GoRoute( @@ -542,7 +545,7 @@ class ShellRouteContext { /// passed to the /b/details route so that it displays on the root Navigator /// instead of the ShellRoute's Navigator: /// -/// ``` +/// ```dart /// final GlobalKey _rootNavigatorKey = /// GlobalKey(); /// @@ -601,7 +604,7 @@ class ShellRouteContext { /// /// For example: /// -/// ``` +/// ```dart /// ShellRoute( /// builder: (BuildContext context, GoRouterState state, Widget child) { /// return Scaffold( @@ -739,7 +742,7 @@ class ShellRoute extends ShellRouteBase { /// accomplished by using the method [StatefulNavigationShell.goBranch], for /// example: /// -/// ``` +/// ```dart /// void _onItemTapped(int index) { /// navigationShell.goBranch(index: index); /// } @@ -1059,7 +1062,7 @@ typedef ShellNavigationContainerBuilder = Widget Function(BuildContext context, /// where the List of Widgets represent the Navigators for each branch. /// /// Example: -/// ``` +/// ```dart /// builder: (BuildContext context, GoRouterState state, /// StatefulNavigationShell navigationShell) { /// return StatefulNavigationShell( diff --git a/packages/go_router/lib/src/state.dart b/packages/go_router/lib/src/state.dart index 323321b6a8b5..0a1fb54ba79b 100644 --- a/packages/go_router/lib/src/state.dart +++ b/packages/go_router/lib/src/state.dart @@ -102,7 +102,7 @@ class GoRouterState { /// /// To access GoRouterState from a widget. /// - /// ``` + /// ```dart /// GoRoute( /// path: '/:id' /// builder: (_, __) => MyWidget(), diff --git a/packages/go_router/pubspec.yaml b/packages/go_router/pubspec.yaml index 7195e85f1f66..ce916a07f3d9 100644 --- a/packages/go_router/pubspec.yaml +++ b/packages/go_router/pubspec.yaml @@ -1,7 +1,7 @@ name: go_router description: A declarative router for Flutter based on Navigation 2 supporting deep linking, data-driven routes and more -version: 14.4.0 +version: 14.4.1 repository: https://github.com/flutter/packages/tree/main/packages/go_router issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router%22 diff --git a/packages/google_sign_in/google_sign_in/CHANGELOG.md b/packages/google_sign_in/google_sign_in/CHANGELOG.md index 67fb3576b743..24564442c8f9 100644 --- a/packages/google_sign_in/google_sign_in/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 6.2.2 +* Adds `missing_code_block_language_in_doc_comment` lint. * Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. * Updates support matrix in README to indicate that iOS 11 is no longer supported. * Clients on versions of Flutter that still support iOS 11 can continue to use this diff --git a/packages/google_sign_in/google_sign_in/lib/testing.dart b/packages/google_sign_in/google_sign_in/lib/testing.dart index e519b34b199a..23510a2c4a70 100644 --- a/packages/google_sign_in/google_sign_in/lib/testing.dart +++ b/packages/google_sign_in/google_sign_in/lib/testing.dart @@ -10,7 +10,7 @@ import 'package:flutter/services.dart' show MethodCall; /// /// Example usage: /// -/// ``` +/// ```dart /// GoogleSignIn googleSignIn; /// FakeSignInBackend fakeSignInBackend; /// diff --git a/packages/google_sign_in/google_sign_in/pubspec.yaml b/packages/google_sign_in/google_sign_in/pubspec.yaml index 4161121f6853..c19b4c2b0974 100644 --- a/packages/google_sign_in/google_sign_in/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in/pubspec.yaml @@ -3,7 +3,7 @@ description: Flutter plugin for Google Sign-In, a secure authentication system for signing in with a Google account. repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22 -version: 6.2.1 +version: 6.2.2 environment: sdk: ^3.3.0 diff --git a/packages/process/CHANGELOG.md b/packages/process/CHANGELOG.md index 0e8d3bdcaa1e..603c5efc8aec 100644 --- a/packages/process/CHANGELOG.md +++ b/packages/process/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 5.0.3 +* Adds `missing_code_block_language_in_doc_comment` lint. * Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. ## 5.0.2 diff --git a/packages/process/lib/src/interface/process_manager.dart b/packages/process/lib/src/interface/process_manager.dart index ba1e2a1099ca..d506cdc20f03 100644 --- a/packages/process/lib/src/interface/process_manager.dart +++ b/packages/process/lib/src/interface/process_manager.dart @@ -57,11 +57,13 @@ abstract class ProcessManager { /// The following code uses `start` to grep for `main` in the /// file `test.dart` on Linux. /// - /// ProcessManager mgr = new LocalProcessManager(); - /// mgr.start(['grep', '-i', 'main', 'test.dart']).then((process) { - /// stdout.addStream(process.stdout); - /// stderr.addStream(process.stderr); - /// }); + /// ```dart + /// ProcessManager mgr = new LocalProcessManager(); + /// mgr.start(['grep', '-i', 'main', 'test.dart']).then((process) { + /// stdout.addStream(process.stdout); + /// stderr.addStream(process.stderr); + /// }); + /// ``` /// /// If [mode] is [ProcessStartMode.normal] (the default) a child /// process will be started with `stdin`, `stdout` and `stderr` @@ -130,11 +132,13 @@ abstract class ProcessManager { /// The following code uses `run` to grep for `main` in the /// file `test.dart` on Linux. /// - /// ProcessManager mgr = new LocalProcessManager(); - /// mgr.run('grep', ['-i', 'main', 'test.dart']).then((result) { - /// stdout.write(result.stdout); - /// stderr.write(result.stderr); - /// }); + /// ```dart + /// ProcessManager mgr = new LocalProcessManager(); + /// mgr.run('grep', ['-i', 'main', 'test.dart']).then((result) { + /// stdout.write(result.stdout); + /// stderr.write(result.stderr); + /// }); + /// ``` Future run( List command, { String? workingDirectory, diff --git a/packages/process/pubspec.yaml b/packages/process/pubspec.yaml index 4686706ea0a7..4c5296dc7da8 100644 --- a/packages/process/pubspec.yaml +++ b/packages/process/pubspec.yaml @@ -2,7 +2,7 @@ name: process description: A pluggable, mockable process invocation abstraction for Dart. repository: https://github.com/flutter/packages/tree/main/packages/process issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+process%22 -version: 5.0.2 +version: 5.0.3 environment: sdk: ^3.3.0 diff --git a/packages/rfw/CHANGELOG.md b/packages/rfw/CHANGELOG.md index ea4382a25811..e3fbedffe13d 100644 --- a/packages/rfw/CHANGELOG.md +++ b/packages/rfw/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 1.0.30 +* Adds `missing_code_block_language_in_doc_comment` lint. * Updates minimum supported SDK version to Flutter 3.19/Dart 3.3. ## 1.0.29 diff --git a/packages/rfw/lib/src/dart/binary.dart b/packages/rfw/lib/src/dart/binary.dart index cd999377f207..181760b2e6f9 100644 --- a/packages/rfw/lib/src/dart/binary.dart +++ b/packages/rfw/lib/src/dart/binary.dart @@ -115,7 +115,9 @@ Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) { /// /// For example, the string "Hello" would be encoded as: /// -/// 05 00 00 00 00 00 00 00 48 65 6C 6C 6F +/// ```none +/// 05 00 00 00 00 00 00 00 48 65 6C 6C 6F +/// ``` /// /// * Lists are encoded as an integer length, followed by that many values /// back to back. When lists are of specific types (e.g. lists of imports), @@ -124,15 +126,19 @@ Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) { /// followed by the value (tagged lists). For example, a list of integers with /// the values 1 and 2 in that order would be encoded as: /// -/// 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 -/// 02 00 00 00 00 00 00 00 +/// ```none +/// 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 +/// 02 00 00 00 00 00 00 00 +/// ``` /// /// A list of arbitrary values that happens to contain one string "Hello" /// would be encoded as follows; 0x04 is the tag for "String" (the full list /// of tags is described below): /// -/// 01 00 00 00 00 00 00 00 04 05 00 00 00 00 00 00 -/// 00 48 65 6C 6C 6F +/// ```none +/// 01 00 00 00 00 00 00 00 04 05 00 00 00 00 00 00 +/// 00 48 65 6C 6C 6F +/// ``` /// /// A list of length zero is eight zero bytes with no additional payload. /// @@ -147,8 +153,10 @@ Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) { /// strings, so they are untagged) is encoded as follows (0x02 is the tag for /// integers): /// -/// 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 -/// 61 02 0F 00 00 00 00 00 00 00 +/// ```none +/// 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 +/// 61 02 0F 00 00 00 00 00 00 00 +/// ``` /// /// Objects are encoded as follows: /// @@ -159,8 +167,10 @@ Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) { /// one of the subparts of the imported library name. For example, `import /// a.b` is encoded as: /// -/// 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 -/// 61 01 00 00 00 00 00 00 00 62 +/// ```none +/// 02 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 +/// 61 01 00 00 00 00 00 00 00 62 +/// ``` /// /// * Widget declarations are encoded as a string giving the declaration name, /// an untagged map for the initial state, and finally the value that @@ -220,7 +230,7 @@ Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) { /// /// For example, this switch: /// -/// ``` +/// ```none /// switch (args.a) { /// 0: 'z', /// 1: 'o', @@ -230,11 +240,13 @@ Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) { /// /// ...is encoded as follows (including the tag for the switch itself): /// -/// 0F 0A 01 00 00 00 00 00 00 00 61 03 00 00 00 00 -/// 00 00 00 02 00 00 00 00 00 00 00 00 04 01 00 00 -/// 00 00 00 00 00 7A 02 01 00 00 00 00 00 00 00 04 -/// 01 00 00 00 00 00 00 00 6F 10 04 01 00 00 00 00 -/// 00 00 00 64 +/// ```none +/// 0F 0A 01 00 00 00 00 00 00 00 61 03 00 00 00 00 +/// 00 00 00 02 00 00 00 00 00 00 00 00 04 01 00 00 +/// 00 00 00 00 00 7A 02 01 00 00 00 00 00 00 00 04 +/// 01 00 00 00 00 00 00 00 6F 10 04 01 00 00 00 00 +/// 00 00 00 64 +/// ``` /// /// * Event handlers have the tag 0x0E, and are encoded as a string /// ([EventHandler.eventName]) and an untagged map diff --git a/packages/rfw/lib/src/dart/text.dart b/packages/rfw/lib/src/dart/text.dart index 248f15ea26b4..2dc82c0283b5 100644 --- a/packages/rfw/lib/src/dart/text.dart +++ b/packages/rfw/lib/src/dart/text.dart @@ -139,7 +139,7 @@ import 'model.dart'; /// The numbers represented must be in the range -9,223,372,036,854,775,808 to /// 9,223,372,036,854,775,807. /// -/// ``` +/// ```bnf /// double ::= "-"? digit+ ("." digit+)? (("e" | "E") "-"? digit+)? /// ``` /// @@ -224,13 +224,13 @@ DynamicMap parseDataFile(String file) { /// /// Imports have this form: /// -/// ``` +/// ```none /// import library.name; /// ``` /// /// For example: /// -/// ``` +/// ```none /// import core.widgets; /// ``` /// @@ -245,7 +245,7 @@ DynamicMap parseDataFile(String file) { /// /// To declare a widget named A in terms of a widget B, the following form is used: /// -/// ``` +/// ```none /// widget A = B(); /// ``` /// @@ -253,14 +253,14 @@ DynamicMap parseDataFile(String file) { /// /// If the widget A is to be stateful, a map is inserted before the equals sign: /// -/// ``` +/// ```none /// widget A { } = B(); /// ``` /// /// The map describes the default values of the state. For example, a button /// might have a "down" state, which is initially false: /// -/// ``` +/// ```none /// widget Button { down: false } = Container(); /// ``` /// @@ -277,7 +277,7 @@ DynamicMap parseDataFile(String file) { /// /// In this example, several constructor calls are nested together: /// -/// ``` +/// ```none /// widget Foo = Column( /// children: [ /// Container( @@ -306,7 +306,7 @@ DynamicMap parseDataFile(String file) { /// /// In this example several widget builders are nested together: /// -/// ``` +/// ```none /// widget Foo {text: 'this is cool'} = Builder( /// builder: (foo) => Builder( /// builder: (bar) => Builder( @@ -374,21 +374,21 @@ DynamicMap parseDataFile(String file) { /// /// For example, suppose one instantiated a widget Foo as follows: /// -/// ``` +/// ```none /// Foo(name: "Bobbins") /// ``` /// /// ...then in the definition of Foo, one might pass the value of this "name" /// argument to another widget, say a Text widget, as follows: /// -/// ``` +/// ```none /// widget Foo = Text(text: args.name); /// ``` /// /// The arguments can have structure. For example, if the argument passed to Foo /// was: /// -/// ``` +/// ```none /// Foo(show: { name: "Cracking the Cryptic", phrase: "Bobbins" }) /// ``` /// @@ -396,7 +396,7 @@ DynamicMap parseDataFile(String file) { /// would specify an argument reference consisting of the values "show" and /// "phrase", as in `args.show.phrase`. For example: /// -/// ``` +/// ```none /// widget Foo = Text(text: args.show.phrase); /// ``` /// @@ -410,7 +410,7 @@ DynamicMap parseDataFile(String file) { /// doubles, bools, and strings (see [DynamicContent]). For example, if the data /// model looks like this: /// -/// ``` +/// ```none /// { server: { cart: [ { name: "Apple"}, { name: "Banana"} ] } /// ``` /// @@ -418,7 +418,7 @@ DynamicMap parseDataFile(String file) { /// would specify a data model reference consisting of the values "server", /// "cart", 1, and "name", as in `data.server.cart.1.name`. For example: /// -/// ``` +/// ```none /// Text(text: data.server.cart.1.name) /// ``` /// @@ -433,7 +433,7 @@ DynamicMap parseDataFile(String file) { /// A widget that shows all the values from a list in a [ListView] might look /// like this: /// -/// ``` +/// ```none /// widget Items = ListView( /// children: [ /// ...for item in args.list: @@ -444,7 +444,7 @@ DynamicMap parseDataFile(String file) { /// /// Such a widget would be used like this: /// -/// ``` +/// ```none /// Items(list: [ "Hello", "World" ]) /// ``` /// @@ -461,7 +461,7 @@ DynamicMap parseDataFile(String file) { /// Loop references use the _ident_. In the example above, that is `item`. In /// more elaborate examples, it can include subreferences. For example: /// -/// ``` +/// ```none /// widget Items = ListView( /// children: [ /// Text(text: 'Products:'), @@ -474,7 +474,7 @@ DynamicMap parseDataFile(String file) { /// /// This might be used as follows: /// -/// ``` +/// ```none /// Items(products: [ /// { name: { abbreviation: "TI4", displayName: "Twilight Imperium IV" }, price: 120.0 }, /// { name: { abbreviation: "POK", displayName: "Prophecy of Kings" }, price: 100.0 }, @@ -490,7 +490,7 @@ DynamicMap parseDataFile(String file) { /// Here a button is described as having a "down" state whose first value is /// "false": /// -/// ``` +/// ```none /// widget Button { down: false } = Container( /// // ... /// ); @@ -503,7 +503,7 @@ DynamicMap parseDataFile(String file) { /// Here, the button's state is referenced (in a pretty nonsensical way; /// controlling whether its label wraps based on the value of the state): /// -/// ``` +/// ```none /// widget Button { down: false } = Container( /// child: Text(text: 'Hello World', softWrap: state.down), /// ); @@ -523,7 +523,7 @@ DynamicMap parseDataFile(String file) { /// /// The syntax for a switch uses the following form: /// -/// ``` +/// ```none /// switch value { /// case1: template1, /// case2: template2, @@ -546,7 +546,7 @@ DynamicMap parseDataFile(String file) { /// appeared pressed when the "down" state was true (but note that we still /// don't have anything to toggle that state!): /// -/// ``` +/// ```none /// widget Button { down: false } = Container( /// margin: switch state.down { /// false: [ 0.0, 0.0, 8.0, 8.0 ], @@ -565,7 +565,7 @@ DynamicMap parseDataFile(String file) { /// /// Signalling event handlers have a name and an arguments map: /// -/// ``` +/// ```none /// event "..." { } /// ``` /// @@ -575,7 +575,7 @@ DynamicMap parseDataFile(String file) { /// For example, the event handler in the following sequence sends the event /// called "hello" with a map containing just one key, "id", whose value is 1: /// -/// ``` +/// ```none /// Button( /// onPressed: event "hello" { id: 1 }, /// child: Text(text: "Greetings"), @@ -586,7 +586,7 @@ DynamicMap parseDataFile(String file) { /// to assign to that state. Such handlers are only meaningful within widgets /// that have state, as described above. They have this form: /// -/// ``` +/// ```none /// set state.foo.bar = value /// ``` /// @@ -595,7 +595,7 @@ DynamicMap parseDataFile(String file) { /// /// This lets us finish the earlier button: /// -/// ``` +/// ```none /// widget Button { down: false } = GestureDetector( /// onTapDown: set state.down = true, /// onTapUp: set state.down = false, diff --git a/packages/rfw/lib/src/flutter/material_widgets.dart b/packages/rfw/lib/src/flutter/material_widgets.dart index 16132b1ad3cd..55ef96e1e541 100644 --- a/packages/rfw/lib/src/flutter/material_widgets.dart +++ b/packages/rfw/lib/src/flutter/material_widgets.dart @@ -64,10 +64,16 @@ import 'runtime.dart'; /// be supported. As a result, the following `ButtonBar` parameters are no longer /// supported: /// +// TODO(kallentu): Remove ignore and fix when stable is bumped. +// https://github.com/flutter/flutter/issues/157620 +// ignore: missing_code_block_language_in_doc_comment /// * `buttonMinWidth` /// * `buttonHeight` /// * `buttonAlignedDropdown` /// +// TODO(kallentu): Remove ignore and fix when stable is bumped. +// https://github.com/flutter/flutter/issues/157620 +// ignore: missing_code_block_language_in_doc_comment /// It is recommended to use the [OverflowBar] widget. /// /// Some features are not supported: diff --git a/packages/rfw/pubspec.yaml b/packages/rfw/pubspec.yaml index e405a0f6ba37..76afa865e101 100644 --- a/packages/rfw/pubspec.yaml +++ b/packages/rfw/pubspec.yaml @@ -2,7 +2,7 @@ name: rfw description: "Remote Flutter widgets: a library for rendering declarative widget description files at runtime." repository: https://github.com/flutter/packages/tree/main/packages/rfw issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+rfw%22 -version: 1.0.29 +version: 1.0.30 environment: sdk: ^3.3.0 diff --git a/packages/web_benchmarks/CHANGELOG.md b/packages/web_benchmarks/CHANGELOG.md index 0096da891242..0c85d4399095 100644 --- a/packages/web_benchmarks/CHANGELOG.md +++ b/packages/web_benchmarks/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.1.1 + +* Adds `missing_code_block_language_in_doc_comment` lint. + ## 3.1.0 * Add `flutter_frame.total_time`, `flutter_frame.build_time`, and `flutter_frame.raster_time` diff --git a/packages/web_benchmarks/lib/src/browser.dart b/packages/web_benchmarks/lib/src/browser.dart index 9c575b167b4a..272a41d7b2b2 100644 --- a/packages/web_benchmarks/lib/src/browser.dart +++ b/packages/web_benchmarks/lib/src/browser.dart @@ -481,7 +481,7 @@ class BlinkTraceEvent { /// /// Sample event encoded as JSON (the data is bogus, this just shows the format): /// - /// ``` + /// ```json /// { /// "name": "myName", /// "cat": "category,list", diff --git a/packages/web_benchmarks/lib/src/recorder.dart b/packages/web_benchmarks/lib/src/recorder.dart index eea86b307319..92a710dbc8bd 100644 --- a/packages/web_benchmarks/lib/src/recorder.dart +++ b/packages/web_benchmarks/lib/src/recorder.dart @@ -134,7 +134,7 @@ abstract class Recorder { /// /// Example: /// -/// ``` +/// ```dart /// class BenchForLoop extends RawRecorder { /// BenchForLoop() : super(name: benchmarkName); /// @@ -185,7 +185,7 @@ abstract class RawRecorder extends Recorder { /// /// Example: /// -/// ``` +/// ```dart /// class BenchDrawCircle extends SceneBuilderRecorder { /// BenchDrawCircle() : super(name: benchmarkName); /// @@ -277,7 +277,7 @@ abstract class SceneBuilderRecorder extends Recorder { /// /// Example: /// -/// ``` +/// ```dart /// class BenchListView extends WidgetRecorder { /// BenchListView() : super(name: benchmarkName); /// diff --git a/packages/web_benchmarks/pubspec.yaml b/packages/web_benchmarks/pubspec.yaml index 1ee5ad4aebb1..1fdc26d8201a 100644 --- a/packages/web_benchmarks/pubspec.yaml +++ b/packages/web_benchmarks/pubspec.yaml @@ -2,7 +2,7 @@ name: web_benchmarks description: A benchmark harness for performance-testing Flutter apps in Chrome. repository: https://github.com/flutter/packages/tree/main/packages/web_benchmarks issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+web_benchmarks%22 -version: 3.1.0 +version: 3.1.1 environment: sdk: ^3.3.0 diff --git a/packages/webview_flutter/webview_flutter_android/CHANGELOG.md b/packages/webview_flutter/webview_flutter_android/CHANGELOG.md index a7683435ce2b..c660eb72f10e 100644 --- a/packages/webview_flutter/webview_flutter_android/CHANGELOG.md +++ b/packages/webview_flutter/webview_flutter_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.1 + +* Adds `missing_code_block_language_in_doc_comment` lint. + ## 4.0.0 * Bumps androidx.webkit:webkit from 1.12.0 to 1.12.1. diff --git a/packages/webview_flutter/webview_flutter_android/lib/src/weak_reference_utils.dart b/packages/webview_flutter/webview_flutter_android/lib/src/weak_reference_utils.dart index fc247f8b60f7..f12485ad6e71 100644 --- a/packages/webview_flutter/webview_flutter_android/lib/src/weak_reference_utils.dart +++ b/packages/webview_flutter/webview_flutter_android/lib/src/weak_reference_utils.dart @@ -5,7 +5,7 @@ /// Helper method for creating callbacks methods with a weak reference. /// /// Example: -/// ``` +/// ```dart /// final JavascriptChannelRegistry javascriptChannelRegistry = ... /// /// final WKScriptMessageHandler handler = WKScriptMessageHandler( diff --git a/packages/webview_flutter/webview_flutter_android/pubspec.yaml b/packages/webview_flutter/webview_flutter_android/pubspec.yaml index 031ca80375d1..2b8bf262b1cd 100644 --- a/packages/webview_flutter/webview_flutter_android/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_android/pubspec.yaml @@ -2,7 +2,7 @@ name: webview_flutter_android description: A Flutter plugin that provides a WebView widget on Android. repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22 -version: 4.0.0 +version: 4.0.1 environment: sdk: ^3.5.0 diff --git a/packages/webview_flutter/webview_flutter_web/CHANGELOG.md b/packages/webview_flutter/webview_flutter_web/CHANGELOG.md index adabb3596545..abe9eee1f0c2 100644 --- a/packages/webview_flutter/webview_flutter_web/CHANGELOG.md +++ b/packages/webview_flutter/webview_flutter_web/CHANGELOG.md @@ -1,5 +1,6 @@ -## NEXT +## 0.2.3+3 +* Adds `missing_code_block_language_in_doc_comment` lint. * Updates minimum supported SDK version to Flutter 3.22/Dart 3.4. ## 0.2.3+2 diff --git a/packages/webview_flutter/webview_flutter_web/lib/src/http_request_factory.dart b/packages/webview_flutter/webview_flutter_web/lib/src/http_request_factory.dart index 1540e547c02b..1500921201b8 100644 --- a/packages/webview_flutter/webview_flutter_web/lib/src/http_request_factory.dart +++ b/packages/webview_flutter/webview_flutter_web/lib/src/http_request_factory.dart @@ -39,21 +39,25 @@ class HttpRequestFactory { /// /// The following is equivalent to the [getString] sample above: /// - /// var name = Uri.encodeQueryComponent('John'); - /// var id = Uri.encodeQueryComponent('42'); - /// HttpRequest.request('users.json?name=$name&id=$id') - /// .then((HttpRequest resp) { - /// // Do something with the response. - /// }); + /// ```dart + /// var name = Uri.encodeQueryComponent('John'); + /// var id = Uri.encodeQueryComponent('42'); + /// HttpRequest.request('users.json?name=$name&id=$id') + /// .then((HttpRequest resp) { + /// // Do something with the response. + /// }); + /// ``` /// /// Here's an example of submitting an entire form with [FormData]. /// - /// var myForm = querySelector('form#myForm'); - /// var data = new FormData(myForm); - /// HttpRequest.request('/submit', method: 'POST', sendData: data) - /// .then((HttpRequest resp) { - /// // Do something with the response. - /// }); + /// ```dart + /// var myForm = querySelector('form#myForm'); + /// var data = new FormData(myForm); + /// HttpRequest.request('/submit', method: 'POST', sendData: data) + /// .then((HttpRequest resp) { + /// // Do something with the response. + /// }); + /// ``` /// /// Requests for `file://` URIs are only supported by Chrome extensions /// with appropriate permissions in their manifest. Requests to file:// URIs diff --git a/packages/webview_flutter/webview_flutter_web/pubspec.yaml b/packages/webview_flutter/webview_flutter_web/pubspec.yaml index dccc235789b0..6ca56109b377 100644 --- a/packages/webview_flutter/webview_flutter_web/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_web/pubspec.yaml @@ -2,7 +2,7 @@ name: webview_flutter_web description: A Flutter plugin that provides a WebView widget on web. repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_web issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22 -version: 0.2.3+2 +version: 0.2.3+3 environment: sdk: ^3.4.0 diff --git a/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md b/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md index 3091a1b5a3e9..134f22aad28b 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md +++ b/packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.16.1 + +* Adds `missing_code_block_language_in_doc_comment` lint. + ## 3.16.0 * Supports NTLM for authentication. diff --git a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/weak_reference_utils.dart b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/weak_reference_utils.dart index fc247f8b60f7..f12485ad6e71 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/weak_reference_utils.dart +++ b/packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/weak_reference_utils.dart @@ -5,7 +5,7 @@ /// Helper method for creating callbacks methods with a weak reference. /// /// Example: -/// ``` +/// ```dart /// final JavascriptChannelRegistry javascriptChannelRegistry = ... /// /// final WKScriptMessageHandler handler = WKScriptMessageHandler( diff --git a/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml b/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml index 573c90f04ca3..b07e68045fe1 100644 --- a/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_wkwebview/pubspec.yaml @@ -2,7 +2,7 @@ name: webview_flutter_wkwebview description: A Flutter plugin that provides a WebView widget based on Apple's WKWebView control. repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_wkwebview issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22 -version: 3.16.0 +version: 3.16.1 environment: sdk: ^3.5.0 diff --git a/script/tool/lib/src/update_release_info_command.dart b/script/tool/lib/src/update_release_info_command.dart index 29ff14389b2f..c35759668b6b 100644 --- a/script/tool/lib/src/update_release_info_command.dart +++ b/script/tool/lib/src/update_release_info_command.dart @@ -250,7 +250,7 @@ class UpdateReleaseInfoCommand extends PackageLoopingCommand { /// any missing periods. /// /// E.g., 'A line\nAnother line.' will become: - /// ``` + /// ```none /// [ '* A line.', '* Another line.' ] /// ``` Iterable _changelogAdditionsAsList({String listMarker = '*'}) { diff --git a/third_party/packages/flutter_svg/CHANGELOG.md b/third_party/packages/flutter_svg/CHANGELOG.md index 1f64d4639a56..9f135f77191b 100644 --- a/third_party/packages/flutter_svg/CHANGELOG.md +++ b/third_party/packages/flutter_svg/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.12 + +* Adds `missing_code_block_language_in_doc_comment` lint. + ## 2.0.11 * Transfers the package source from https://github.com/dnfield/flutter_svg diff --git a/third_party/packages/flutter_svg/lib/svg.dart b/third_party/packages/flutter_svg/lib/svg.dart index 964852a5787a..0efcbdaa1eef 100644 --- a/third_party/packages/flutter_svg/lib/svg.dart +++ b/third_party/packages/flutter_svg/lib/svg.dart @@ -146,7 +146,7 @@ class SvgPicture extends StatelessWidget { /// bundled, the app has to specify which ones to include. For instance a /// package named `fancy_backgrounds` could have: /// - /// ``` + /// ```none /// lib/backgrounds/background1.svg /// lib/backgrounds/background2.svg /// lib/backgrounds/background3.svg diff --git a/third_party/packages/flutter_svg/pubspec.yaml b/third_party/packages/flutter_svg/pubspec.yaml index 5ac508491f6d..c0183b44db42 100644 --- a/third_party/packages/flutter_svg/pubspec.yaml +++ b/third_party/packages/flutter_svg/pubspec.yaml @@ -2,7 +2,7 @@ name: flutter_svg description: An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files. repository: https://github.com/flutter/packages/tree/main/third_party/packages/flutter_svg issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_svg%22 -version: 2.0.11 +version: 2.0.12 environment: sdk: ^3.4.0