Skip to content

Commit a44e95e

Browse files
authored
Fix doc comment references (#323)
* Fix doc comment references Most importantly, the link to `addChunkedEncoding` which was invalid The others are handled fine by dartdoc, but cause warnings with the `comment_references` lint. * oops
1 parent 32e342d commit a44e95e

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

pkgs/shelf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ to capture only errors that would otherwise be top-leveled:
124124
```dart
125125
/// Run [callback] and capture any errors that would otherwise be top-leveled.
126126
///
127-
/// If [this] is called in a non-root error zone, it will just run [callback]
127+
/// If `this` is called in a non-root error zone, it will just run [callback]
128128
/// and return the result. Otherwise, it will capture any errors using
129129
/// [runZoned] and pass them to [onError].
130130
void catchTopLevelErrors(

pkgs/shelf/lib/src/middleware/add_chunked_encoding.dart

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ import 'package:http_parser/http_parser.dart';
77

88
import '../middleware.dart';
99

10-
/// Middleware that adds [chunked transfer coding][] to responses if none of the
11-
/// following conditions are true:
12-
///
13-
/// [chunked transfer coding]: https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
10+
/// Middleware that adds
11+
/// [chunked transfer coding](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1)
12+
/// to a responses if none of the following conditions are true:
1413
///
1514
/// * A Content-Length header is provided.
1615
/// * The Content-Type header indicates the MIME type `multipart/byteranges`.
1716
/// * The Transfer-Encoding header already includes the `chunked` coding.
1817
///
19-
/// This is intended for use by [Shelf adapters][] rather than end-users.
20-
///
21-
/// [Shelf adapters]: https://github.com/dart-lang/shelf#adapters
18+
/// This is intended for use by
19+
/// [Shelf adapters](https://pub.dev/packages/shelf#adapters) rather than
20+
/// end-users.
2221
final addChunkedEncoding = createMiddleware(responseHandler: (response) {
2322
if (response.contentLength != null) return response;
2423
if (response.statusCode < 200) return response;

pkgs/shelf/lib/src/request.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ class _OnHijack {
294294

295295
_OnHijack(this._callback);
296296

297-
/// Calls [this].
297+
/// Calls `this`.
298298
///
299-
/// Throws a [StateError] if [this] has already been called.
299+
/// Throws a [StateError] if `this` has already been called.
300300
void run(void Function(StreamChannel<List<int>>) callback) {
301301
if (called) throw StateError('This request has already been hijacked.');
302302
called = true;

pkgs/shelf/lib/src/util.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import 'shelf_unmodifiable_map.dart';
1010

1111
/// Run [callback] and capture any errors that would otherwise be top-leveled.
1212
///
13-
/// If [this] is called in a non-root error zone, it will just run [callback]
13+
/// If `this` is called in a non-root error zone, it will just run [callback]
1414
/// and return the result. Otherwise, it will capture any errors using
1515
/// [runZoned] and pass them to [onError].
1616
void catchTopLevelErrors(void Function() callback,

pkgs/shelf_router_generator/lib/src/shelf_router_generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const _responseType = g.TypeChecker.fromRuntime(shelf.Response);
3434
const _requestType = g.TypeChecker.fromRuntime(shelf.Request);
3535
const _stringType = g.TypeChecker.fromRuntime(String);
3636

37-
/// A representation of a handler that was annotated with [Route].
37+
/// A representation of a handler that was annotated with [shelf_router.Route].
3838
class _Handler {
3939
final String verb, route;
4040
final ExecutableElement element;

pkgs/shelf_test_handler/lib/src/expectation.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import 'package:shelf/shelf.dart';
66

77
/// A single expectation for an HTTP request sent to a [ShelfTestHandler].
88
class Expectation {
9-
/// The expected request method, or [null] if this allows any requests.
9+
/// The expected request method, or `null` if this allows any requests.
1010
final String? method;
1111

12-
/// The expected request path, or [null] if this allows any requests.
12+
/// The expected request path, or `null` if this allows any requests.
1313
final String? path;
1414

1515
/// The handler to use for requests that match this expectation.

pkgs/shelf_test_handler/lib/src/handler.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class ShelfTestHandler {
3939
_zone = Zone.current;
4040

4141
/// Expects that a single HTTP request with the given [method] and [path] will
42-
/// be made to [this].
42+
/// be made to `this`.
4343
///
4444
/// The [path] should be root-relative; that is, it shuld start with "/".
4545
///
@@ -51,7 +51,7 @@ class ShelfTestHandler {
5151
_expectations.add(Expectation(method, path, handler));
5252
}
5353

54-
/// Expects that a single HTTP request will be made to [this].
54+
/// Expects that a single HTTP request will be made to `this`.
5555
///
5656
/// When a request is made, [handler] is used to handle that request.
5757
///

0 commit comments

Comments
 (0)