Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add missing_code_block_language_in_doc_comment lint to flutter/packages.
  • Loading branch information
kallentu committed Oct 23, 2024
commit 169240d7e98821e73ca8296d0f9ef30ec8dbf3f4
1 change: 1 addition & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_migrate/lib/src/base/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ String getEnumName(dynamic enumItem) {
/// Rationale:
///
/// Consider the following snippet:
/// ```
/// ```dart
/// try {
/// await foo();
/// ...
Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_migrate/lib/src/base/logger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ class SpinnerStatus extends AnonymousSpinnerStatus {
/// ```
///
/// yields:
/// ```
/// ```none
/// Usage: app main_command <subcommand>
/// [arguments]
/// ```
Expand Down
33 changes: 18 additions & 15 deletions packages/go_router/lib/src/route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ typedef ExitCallback = FutureOr<bool> 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 ↑
/// ```
///
/// Can be represented as:
///
/// ```
/// ```dart
/// final GoRouter _router = GoRouter(
/// routes: <GoRoute>[
/// GoRoute(
Expand Down Expand Up @@ -122,12 +122,14 @@ typedef ExitCallback = FutureOr<bool> 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>[
/// GoRoute(
Expand All @@ -145,9 +147,10 @@ typedef ExitCallback = FutureOr<bool> 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 {
Expand Down Expand Up @@ -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<void>(
Expand All @@ -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<void>(
Expand All @@ -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(
Expand All @@ -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>[
/// GoRoute(
Expand Down Expand Up @@ -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<NavigatorState> _rootNavigatorKey =
/// GlobalKey<NavigatorState>();
///
Expand Down Expand Up @@ -601,7 +604,7 @@ class ShellRouteContext {
///
/// For example:
///
/// ```
/// ```dart
/// ShellRoute(
/// builder: (BuildContext context, GoRouterState state, Widget child) {
/// return Scaffold(
Expand Down Expand Up @@ -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);
/// }
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion packages/go_router/lib/src/state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class GoRouterState {
///
/// To access GoRouterState from a widget.
///
/// ```
/// ```dart
/// GoRoute(
/// path: '/:id'
/// builder: (_, __) => MyWidget(),
Expand Down
2 changes: 1 addition & 1 deletion packages/google_sign_in/google_sign_in/lib/testing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:flutter/services.dart' show MethodCall;
///
/// Example usage:
///
/// ```
/// ```dart
/// GoogleSignIn googleSignIn;
/// FakeSignInBackend fakeSignInBackend;
///
Expand Down
2 changes: 1 addition & 1 deletion packages/rfw/lib/src/dart/binary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ Uint8List encodeLibraryBlob(RemoteWidgetLibrary value) {
///
/// For example, this switch:
///
/// ```
/// ```none
/// switch (args.a) {
/// 0: 'z',
/// 1: 'o',
Expand Down
Loading