[linter] Clarify that none can be specified to disable highlighting
Fixes https://github.com/dart-lang/site-www/issues/5861
Change-Id: Ic0dfdded5f38f1de4a19a7b41e52f87f3f9b9cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368221
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/linter/lib/src/rules/missing_code_block_language_in_doc_comment.dart b/pkg/linter/lib/src/rules/missing_code_block_language_in_doc_comment.dart
index 1e147f6..6fd2494 100644
--- a/pkg/linter/lib/src/rules/missing_code_block_language_in_doc_comment.dart
+++ b/pkg/linter/lib/src/rules/missing_code_block_language_in_doc_comment.dart
@@ -19,6 +19,8 @@
See [highlight.js](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md)
for the list of languages supported by `dart doc`.
+To disable syntax highlighting or if no language is suitable,
+you can specify `none` as the language.
**BAD:**
```dart
diff --git a/pkg/linter/tool/machine/rules.json b/pkg/linter/tool/machine/rules.json
index 625cd64..070a4de 100644
--- a/pkg/linter/tool/machine/rules.json
+++ b/pkg/linter/tool/machine/rules.json
@@ -347,7 +347,7 @@
"incompatible": [],
"sets": [],
"fixStatus": "needsEvaluation",
- "details": "**DO** specify the language used in the code block of a doc comment.\n\nTo enable proper syntax highlighting of Markdown code blocks,\n[`dart doc`](https://dart.dev/tools/dart-doc) strongly recommends code blocks to\nspecify the language used after the initial code fence.\n\nSee [highlight.js](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md)\nfor the list of languages supported by `dart doc`.\n\n**BAD:**\n```dart\n/// ```\n/// void main() {}\n/// ```\nclass A {}\n```\n\n**GOOD:**\n```dart\n/// ```dart\n/// void main() {}\n/// ```\nclass A {}\n```\n\n",
+ "details": "**DO** specify the language used in the code block of a doc comment.\n\nTo enable proper syntax highlighting of Markdown code blocks,\n[`dart doc`](https://dart.dev/tools/dart-doc) strongly recommends code blocks to\nspecify the language used after the initial code fence.\n\nSee [highlight.js](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md)\nfor the list of languages supported by `dart doc`.\nTo disable syntax highlighting or if no language is suitable,\nyou can specify `none` as the language.\n\n**BAD:**\n```dart\n/// ```\n/// void main() {}\n/// ```\nclass A {}\n```\n\n**GOOD:**\n```dart\n/// ```dart\n/// void main() {}\n/// ```\nclass A {}\n```\n\n",
"sinceDartSdk": "3.4.0"
},
{
@@ -2387,7 +2387,7 @@
"state": "stable",
"incompatible": [],
"sets": [],
- "fixStatus": "needsFix",
+ "fixStatus": "hasFix",
"details": "Avoid returning an awaited expression when the expression type is assignable to\nthe function's return type.\n\n\n**BAD:**\n```dart\nFuture<int> future;\nFuture<int> f1() async => await future;\nFuture<int> f2() async {\n return await future;\n}\n```\n\n**GOOD:**\n```dart\nFuture<int> future;\nFuture<int> f1() => future;\nFuture<int> f2() {\n return future;\n}\n```\n\n",
"sinceDartSdk": "2.1.1"
},