Skip to content

Commit 5799424

Browse files
parloughjcollins-g
andauthored
Remove old <nodoc> syntax (dart-lang#3261)
Co-authored-by: Janice Collins <jcollins@google.com>
1 parent 2a39574 commit 5799424

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

lib/src/model/documentation_comment.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,6 @@ mixin DocumentationComment on Documentable, Warnable, Locatable, SourceCode {
829829
}
830830
}
831831
}
832-
if (!hasNodoc && docComment.contains('<nodoc>')) {
833-
// TODO(srawlins): Stop supporting this old format.
834-
hasNodoc = true;
835-
}
836832
_hasNodoc = hasNodoc;
837833
_hasInjectHtml = hasInjectHtml;
838834
_hasTemplate = hasTemplate;

test/src/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import 'package:test/test.dart';
3030

3131
/// The number of public libraries in testing/test_package, minus 2 for
3232
/// the excluded libraries listed in the initializers for _testPackageGraphMemo
33-
/// and minus 1 for the <nodoc> tag in the 'excluded' library.
33+
/// and minus 1 for the @nodoc tag in the 'excluded' library.
3434
const int kTestPackagePublicLibraries = 27;
3535

3636
final _resourceProvider = pubPackageMetaProvider.resourceProvider;

testing/test_package/lib/example.dart

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ const String COLOR_ORANGE = 'orange';
2626

2727
const String COMPLEX_COLOR = 'red' + '-' + 'green' + '-' + 'blue';
2828

29-
/// top level var <nodoc>
29+
/// top level var
30+
/// @nodoc
3031
const DO_NOT_DOCUMENT = 'not documented';
3132

3233
/// This is the same name as a top-level const from the fake lib.
@@ -139,7 +140,7 @@ class Apple {
139140
/// The read-write field `m`.
140141
int m = 0;
141142

142-
/// <nodoc> no docs
143+
/// @nodoc no docs
143144
int? notDocumented;
144145

145146
///Constructor
@@ -180,7 +181,7 @@ class Apple {
180181
void methodWithTypedefParam(processMessage p) {}
181182

182183
/**
183-
* <nodoc> method not documented
184+
* @nodoc method not documented
184185
*/
185186
void notAPublicMethod() {}
186187

@@ -481,15 +482,8 @@ class ShapeType extends _RetainedEnum {
481482
/// that has some operators
482483
class SpecializedDuration extends Duration {}
483484

484-
/**
485-
* class <nodoc>
486-
*/
487-
class unDocumented {
488-
String? s;
489-
}
490-
491485
/// @nodoc
492-
class unDocumented2 {
486+
class unDocumented {
493487
String? s;
494488
}
495489

testing/test_package/lib/excluded.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// This library is excluded from the documentation
22
/// even though it is located in the lib folder by
3-
/// using the <nodoc> tag
3+
/// using the nodoc tag.
4+
/// @nodoc
45
56
library excluded;
67

0 commit comments

Comments
 (0)