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.
This commit is contained in:
Matan Lurey 2024-07-23 17:33:38 -07:00 committed by GitHub
parent 7912e6d27e
commit 3c4ee102aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.