From 3c4ee102aae9e588092a445ad9d5519f0a729391 Mon Sep 17 00:00:00 2001 From: Matan Lurey Date: Tue, 23 Jul 2024 17:33:38 -0700 Subject: [PATCH] Allow-list `sh` as a code-snippet type. (#152196) Otherwise I get the following failure on CI: ```txt packages/flutter_driver/lib/src/native/android.dart:123: Found "```" in code but it did not match RegExp: pattern=^ */// *```dart$ flags= so something is wrong. Line was: " /// ```sh" Found 1 snippet code errors. See the documentation at the top of dev/bots/analyze_snippet_code.dart for details. ``` It seems reasonable to put a reference to a shell command in a Dartdoc comment. --- dev/bots/analyze_snippet_code.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/bots/analyze_snippet_code.dart b/dev/bots/analyze_snippet_code.dart index 4453b52b99..c75b1521e6 100644 --- a/dev/bots/analyze_snippet_code.dart +++ b/dev/bots/analyze_snippet_code.dart @@ -677,7 +677,8 @@ class _SnippetChecker { line.contains('```swift') || line.contains('```glsl') || line.contains('```json') || - line.contains('```csv')) { + line.contains('```csv') || + line.contains('```sh')) { inOtherBlock = true; } else if (line.startsWith(_uncheckedCodeBlockStartRegex)) { // this is an intentionally-unchecked block that doesn't appear in the API docs.