From 9e11d4a105b6f898bcc557496ce3a885d3847f78 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Thu, 12 Jan 2023 17:47:19 -0600 Subject: [PATCH] Use correct API docs link in create --sample help message (#118371) * Use correct API doc link in create --sample help message * Verify Flutter and Dart website links in tool help messages use https * Adjust test failure reasoning message --- packages/flutter_tools/lib/src/commands/create.dart | 2 +- packages/flutter_tools/test/general.shard/args_test.dart | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index 5c46a766430d..8fb90bdf40aa 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -61,7 +61,7 @@ class CreateCommand extends CreateBase { abbr: 's', help: 'Specifies the Flutter code sample to use as the "main.dart" for an application. Implies ' '"--template=app". The value should be the sample ID of the desired sample from the API ' - 'documentation website (http://docs.flutter.dev/). An example can be found at: ' + 'documentation website (https://api.flutter.dev/). An example can be found at: ' 'https://api.flutter.dev/flutter/widgets/SingleChildScrollView-class.html', valueHelp: 'id', ); diff --git a/packages/flutter_tools/test/general.shard/args_test.dart b/packages/flutter_tools/test/general.shard/args_test.dart index 5fd6984e0f7d..4f638211fa0e 100644 --- a/packages/flutter_tools/test/general.shard/args_test.dart +++ b/packages/flutter_tools/test/general.shard/args_test.dart @@ -151,6 +151,7 @@ final RegExp _bannedQuotePatterns = RegExp(r" '|' |'\.|\('|'\)|`"); final RegExp _bannedArgumentReferencePatterns = RegExp(r'[^"=]--[^ ]'); final RegExp _questionablePatterns = RegExp(r'[a-z]\.[A-Z]'); final RegExp _bannedUri = RegExp(r'\b[Uu][Rr][Ii]\b'); +final RegExp _nonSecureFlutterDartUrl = RegExp(r'http://([a-z0-9-]+\.)*(flutter|dart)\.dev', caseSensitive: false); const String _needHelp = "Every option must have help explaining what it does, even if it's " 'for testing purposes, because this is the bare minimum of ' 'documentation we can add just for ourselves. If it is not intended ' @@ -209,6 +210,7 @@ void verifyOptions(String? command, Iterable