Add support for documentation for lints

Change-Id: I5ed032891d276307e0a3ae663b7fa3101bd22442
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255280
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
diff --git a/pkg/analyzer/lib/src/lint/linter.dart b/pkg/analyzer/lib/src/lint/linter.dart
index 687da3a..a0e6655 100644
--- a/pkg/analyzer/lib/src/lint/linter.dart
+++ b/pkg/analyzer/lib/src/lint/linter.dart
@@ -617,6 +617,15 @@
   @override
   final String name;
 
+  /// The documentation for the lint that should appear on the Diagnostic
+  /// messages page. This field should never be accessed in any code in `lib` or
+  /// `bin`.
+  final String? documentation;
+
+  /// A flag indicating whether this lint has documentation on the Diagnostic
+  /// messages page.
+  final bool hasDocumentation;
+
   /// Until pubspec analysis is pushed into the analyzer proper, we need to
   /// do some extra book-keeping to keep track of details that will help us
   /// constitute AnalysisErrorInfos.
@@ -628,6 +637,8 @@
     required this.description,
     required this.details,
     this.maturity = Maturity.stable,
+    this.documentation,
+    this.hasDocumentation = false,
   });
 
   /// A list of incompatible rule ids.