Enable dangling_library_doc_comments and library_annotations lints (#117365)

This commit is contained in:
Michael Goderbauer
2022-12-20 16:03:21 -08:00
committed by GitHub
parent de357647be
commit b308555ed1
516 changed files with 554 additions and 435 deletions

View File

@@ -166,3 +166,4 @@
/// error (something about backticks)
/// this must be the last error, since it aborts parsing of this file
/// ```
String? foo;

View File

@@ -11,7 +11,9 @@
/// ```dart
/// print(x);
/// ```
String? bar;
/// error: empty dart block
/// ```dart
/// ```
String? foo;

View File

@@ -35,7 +35,7 @@
/// ```
/// {@end-tool}
///
String? foo;
// Other comments
// matchesGoldenFile('comment.png');

View File

@@ -6,6 +6,7 @@
// flutter_ignore_for_file: golden_tag (see analyze.dart)
@Tags(<String>['some-other-tag'])
library;
import 'package:test/test.dart';

View File

@@ -4,6 +4,7 @@
// The reduced test set tag is missing. This should fail analysis.
@Tags(<String>['some-other-tag'])
library;
import 'package:test/test.dart';

View File

@@ -29,7 +29,7 @@ const List<String> expectedMainErrors = <String>[
'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/short_but_still_broken.dart:9:12: (statement) (invalid_assignment)',
'dev/bots/test/analyze-snippet-code-test-input/short_but_still_broken.dart:17:4: Empty ```dart block in snippet code.',
'dev/bots/test/analyze-snippet-code-test-input/short_but_still_broken.dart:18:4: Empty ```dart block in snippet code.',
];
const List<String> expectedUiErrors = <String>[