Add none language strings to code blocks. (#146154)
Part 2 from https://github.com/flutter/flutter/pull/146085 In preparation to add the lint `missing_code_block_language_in_doc_comment`, added `none` info strings to a bunch of fenced code blocks that have miscellaneous text or output text. Related to issue: https://github.com/dart-lang/linter/issues/4904 ## 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 [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [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] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [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 [Data Driven Fixes]: https://github.com/flutter/flutter/wiki/Data-driven-Fixes
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// ```
|
||||
/// ```none
|
||||
/// error (something about backticks)
|
||||
/// this must be the last error, since it aborts parsing of this file
|
||||
/// ```
|
||||
|
||||
@@ -25,7 +25,7 @@ const List<String> expectedMainErrors = <String>[
|
||||
'dev/bots/test/analyze-snippet-code-test-input/known_broken_documentation.dart:153:10: (stateful widget) (annotate_overrides)',
|
||||
'dev/bots/test/analyze-snippet-code-test-input/known_broken_documentation.dart:153:10: (stateful widget) (must_call_super)',
|
||||
'dev/bots/test/analyze-snippet-code-test-input/known_broken_documentation.dart:161:7: (top-level declaration) (undefined_identifier)',
|
||||
'dev/bots/test/analyze-snippet-code-test-input/known_broken_documentation.dart:165: Found "```" in code but it did not match RegExp: pattern=^ */// *```dart\$ flags= so something is wrong. Line was: "/// ```"',
|
||||
'dev/bots/test/analyze-snippet-code-test-input/known_broken_documentation.dart:165: Found "```" in code but it did not match RegExp: pattern=^ */// *```dart\$ flags= so something is wrong. Line was: "/// ```none"',
|
||||
'dev/bots/test/analyze-snippet-code-test-input/short_but_still_broken.dart:9:12: (statement) (invalid_assignment)',
|
||||
'dev/bots/test/analyze-snippet-code-test-input/short_but_still_broken.dart:18:4: Empty ```dart block in snippet code.',
|
||||
];
|
||||
|
||||
@@ -93,7 +93,7 @@ enum GitExceptionType {
|
||||
///
|
||||
/// Example output:
|
||||
///
|
||||
/// ```
|
||||
/// ```none
|
||||
/// To github.com:user/engine.git
|
||||
///
|
||||
/// ! [rejected] HEAD -> cherrypicks-flutter-2.8-candidate.3 (non-fast-forward)
|
||||
|
||||
@@ -80,7 +80,7 @@ class PhysicalKeyData {
|
||||
///
|
||||
/// Lines in this file look like this (without the ///):
|
||||
///
|
||||
/// ```
|
||||
/// ```none
|
||||
/// key 100 ALT_RIGHT
|
||||
/// # key 101 "KEY_LINEFEED"
|
||||
/// key 477 F12 FUNCTION
|
||||
|
||||
@@ -395,7 +395,7 @@ class $classNamePrefix$camelCaseName extends $superClass {''';
|
||||
|
||||
/// Return the input string as a Dart-parseable string.
|
||||
///
|
||||
/// ```
|
||||
/// ```none
|
||||
/// foo => 'foo'
|
||||
/// foo "bar" => 'foo "bar"'
|
||||
/// foo 'bar' => "foo 'bar'"
|
||||
@@ -407,7 +407,7 @@ class $classNamePrefix$camelCaseName extends $superClass {''';
|
||||
/// in JSON files are escaped. For example, the backspace character (\b)
|
||||
/// has to be properly escaped by this function so that the generated
|
||||
/// Dart code correctly represents this character:
|
||||
/// ```
|
||||
/// ```none
|
||||
/// foo\bar => 'foo\\bar'
|
||||
/// foo\nbar => 'foo\\nbar'
|
||||
/// foo\\nbar => 'foo\\\\nbar'
|
||||
|
||||
Reference in New Issue
Block a user