Skip to content

Commit 4322382

Browse files
authored
Fix "unintended_html_in_doc_comment" analysis errors (#1291)
1 parent 76512c4 commit 4322382

File tree

11 files changed

+54
-44
lines changed

11 files changed

+54
-44
lines changed

pkgs/http/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.3-wip
2+
3+
* Fixed unintended HTML tags in doc comments.
4+
15
## 1.2.2
26

37
* Require package `web: '>=0.5.0 <2.0.0'`.

pkgs/http/lib/http.dart

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ Future<Response> get(Uri url, {Map<String, String>? headers}) =>
5050

5151
/// Sends an HTTP POST request with the given headers and body to the given URL.
5252
///
53-
/// [body] sets the body of the request. It can be a [String], a [List<int>] or
54-
/// a [Map<String, String>]. If it's a String, it's encoded using [encoding] and
55-
/// used as the body of the request. The content-type of the request will
53+
/// [body] sets the body of the request. It can be a `String`, a `List<int>` or
54+
/// a `Map<String, String>`. If it's a `String`, it's encoded using [encoding]
55+
/// and used as the body of the request. The content-type of the request will
5656
/// default to "text/plain".
5757
///
58-
/// If [body] is a List, it's used as a list of bytes for the body of the
58+
/// If [body] is a `List`, it's used as a list of bytes for the body of the
5959
/// request.
6060
///
61-
/// If [body] is a Map, it's encoded as form fields using [encoding]. The
61+
/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The
6262
/// content-type of the request will be set to
6363
/// `"application/x-www-form-urlencoded"`; this cannot be overridden.
6464
///
@@ -73,15 +73,15 @@ Future<Response> post(Uri url,
7373

7474
/// Sends an HTTP PUT request with the given headers and body to the given URL.
7575
///
76-
/// [body] sets the body of the request. It can be a [String], a [List<int>] or
77-
/// a [Map<String, String>]. If it's a String, it's encoded using [encoding] and
78-
/// used as the body of the request. The content-type of the request will
76+
/// [body] sets the body of the request. It can be a `String`, a `List<int>` or
77+
/// a `Map<String, String>`. If it's a `String`, it's encoded using [encoding]
78+
/// and used as the body of the request. The content-type of the request will
7979
/// default to "text/plain".
8080
///
81-
/// If [body] is a List, it's used as a list of bytes for the body of the
81+
/// If [body] is a `List`, it's used as a list of bytes for the body of the
8282
/// request.
8383
///
84-
/// If [body] is a Map, it's encoded as form fields using [encoding]. The
84+
/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The
8585
/// content-type of the request will be set to
8686
/// `"application/x-www-form-urlencoded"`; this cannot be overridden.
8787
///
@@ -97,15 +97,15 @@ Future<Response> put(Uri url,
9797
/// Sends an HTTP PATCH request with the given headers and body to the given
9898
/// URL.
9999
///
100-
/// [body] sets the body of the request. It can be a [String], a [List<int>] or
101-
/// a [Map<String, String>]. If it's a String, it's encoded using [encoding] and
102-
/// used as the body of the request. The content-type of the request will
100+
/// [body] sets the body of the request. It can be a `String`, a `List<int>` or
101+
/// a `Map<String, String>`. If it's a `String`, it's encoded using [encoding]
102+
/// and used as the body of the request. The content-type of the request will
103103
/// default to "text/plain".
104104
///
105-
/// If [body] is a List, it's used as a list of bytes for the body of the
105+
/// If [body] is a `List`, it's used as a list of bytes for the body of the
106106
/// request.
107107
///
108-
/// If [body] is a Map, it's encoded as form fields using [encoding]. The
108+
/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The
109109
/// content-type of the request will be set to
110110
/// `"application/x-www-form-urlencoded"`; this cannot be overridden.
111111
///

pkgs/http/lib/src/base_response.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*');
117117
///
118118
/// Set-Cookie strings can contain commas. In particular, the following
119119
/// productions defined in RFC-6265, section 4.1.1:
120-
/// - <sane-cookie-date> e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT"
121-
/// - <path-value> e.g. "Path=somepath,"
122-
/// - <extension-av> e.g. "AnyString,Really,"
120+
/// - `<sane-cookie-date>` e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT"
121+
/// - `<path-value>` e.g. "Path=somepath,"
122+
/// - `<extension-av>` e.g. "AnyString,Really,"
123123
///
124124
/// Some values are ambiguous e.g.
125125
/// "Set-Cookie: lang=en; Path=/foo/"
@@ -128,8 +128,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*');
128128
/// "Set-Cookie: lang=en; Path=/foo/,SID=x23"
129129
/// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23"
130130
///
131-
/// The idea behind this regex is that ",<valid token>=" is more likely to
132-
/// start a new <cookie-pair> then be part of <path-value> or <extension-av>.
131+
/// The idea behind this regex is that `,<valid token>=` is more likely to
132+
/// start a new `<cookie-pair>` than be part of `<path-value>` or
133+
/// `<extension-av>`.
133134
///
134135
/// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1
135136
var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)');

pkgs/http/lib/src/client.dart

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ abstract interface class Client {
5454
/// Sends an HTTP POST request with the given headers and body to the given
5555
/// URL.
5656
///
57-
/// [body] sets the body of the request. It can be a [String], a [List<int>]
58-
/// or a [Map<String, String>].
57+
/// [body] sets the body of the request. It can be a `String`, a `List<int>`
58+
/// or a `Map<String, String>`.
5959
///
60-
/// If [body] is a String, it's encoded using [encoding] and used as the body
61-
/// of the request. The content-type of the request will default to
60+
/// If [body] is a `String`, it's encoded using [encoding] and used as the
61+
/// body of the request. The content-type of the request will default to
6262
/// "text/plain".
6363
///
64-
/// If [body] is a List, it's used as a list of bytes for the body of the
64+
/// If [body] is a `List`, it's used as a list of bytes for the body of the
6565
/// request.
6666
///
67-
/// If [body] is a Map, it's encoded as form fields using [encoding]. The
67+
/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The
6868
/// content-type of the request will be set to
6969
/// `"application/x-www-form-urlencoded"`; this cannot be overridden.
7070
///
@@ -77,15 +77,15 @@ abstract interface class Client {
7777
/// Sends an HTTP PUT request with the given headers and body to the given
7878
/// URL.
7979
///
80-
/// [body] sets the body of the request. It can be a [String], a [List<int>]
81-
/// or a [Map<String, String>]. If it's a String, it's encoded using
80+
/// [body] sets the body of the request. It can be a `String`, a `List<int>`
81+
/// or a `Map<String, String>`. If it's a `String`, it's encoded using
8282
/// [encoding] and used as the body of the request. The content-type of the
8383
/// request will default to "text/plain".
8484
///
85-
/// If [body] is a List, it's used as a list of bytes for the body of the
85+
/// If [body] is a `List`, it's used as a list of bytes for the body of the
8686
/// request.
8787
///
88-
/// If [body] is a Map, it's encoded as form fields using [encoding]. The
88+
/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The
8989
/// content-type of the request will be set to
9090
/// `"application/x-www-form-urlencoded"`; this cannot be overridden.
9191
///
@@ -98,15 +98,15 @@ abstract interface class Client {
9898
/// Sends an HTTP PATCH request with the given headers and body to the given
9999
/// URL.
100100
///
101-
/// [body] sets the body of the request. It can be a [String], a [List<int>]
102-
/// or a [Map<String, String>]. If it's a String, it's encoded using
101+
/// [body] sets the body of the request. It can be a `String`, a `List<int>`
102+
/// or a `Map<String, String>`. If it's a `String`, it's encoded using
103103
/// [encoding] and used as the body of the request. The content-type of the
104104
/// request will default to "text/plain".
105105
///
106-
/// If [body] is a List, it's used as a list of bytes for the body of the
106+
/// If [body] is a `List`, it's used as a list of bytes for the body of the
107107
/// request.
108108
///
109-
/// If [body] is a Map, it's encoded as form fields using [encoding]. The
109+
/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The
110110
/// content-type of the request will be set to
111111
/// `"application/x-www-form-urlencoded"`; this cannot be overridden.
112112
///

pkgs/http/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: http
2-
version: 1.2.2
2+
version: 1.2.3-wip
33
description: A composable, multi-platform, Future-based API for HTTP requests.
44
repository: https://github.com/dart-lang/http/tree/master/pkgs/http
55

pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'package:stream_channel/stream_channel.dart';
1313
/// On Startup:
1414
/// - send port
1515
/// On Request Received:
16-
/// - send headers as Map<String, List<String>>
16+
/// - send headers as `Map<String, List<String>>`
1717
/// When Receive Anything:
1818
/// - exit
1919
void hybridMain(StreamChannel<Object?> channel) async {

pkgs/http_client_conformance_tests/lib/src/redirect_server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import 'package:stream_channel/stream_channel.dart';
1818
/// ".../9" | ".../8"
1919
/// ... | ...
2020
/// ".../1" | "/"
21-
/// "/" | <200 return>
21+
/// "/" | &lt;200 return&gt;
2222
void hybridMain(StreamChannel<Object?> channel) async {
2323
late HttpServer server;
2424

pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'package:stream_channel/stream_channel.dart';
1313
/// On Startup:
1414
/// - send port
1515
/// On Request Received:
16-
/// - send headers as Map<String, List<String>>
16+
/// - send headers as `Map<String, List<String>>`
1717
/// When Receive Anything:
1818
/// - exit
1919
void hybridMain(StreamChannel<Object?> channel) async {

pkgs/http_profile/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.1-wip
2+
3+
* Fixed unintended HTML tags in doc comments.
4+
15
## 0.1.0
26

37
* Initial **experimental** release.

pkgs/http_profile/lib/src/utils.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*');
1414
///
1515
/// Set-Cookie strings can contain commas. In particular, the following
1616
/// productions defined in RFC-6265, section 4.1.1:
17-
/// - <sane-cookie-date> e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT"
18-
/// - <path-value> e.g. "Path=somepath,"
19-
/// - <extension-av> e.g. "AnyString,Really,"
17+
/// - `<sane-cookie-date>` e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT"
18+
/// - `<path-value>` e.g. "Path=somepath,"
19+
/// - `<extension-av>` e.g. "AnyString,Really,"
2020
///
2121
/// Some values are ambiguous e.g.
2222
/// "Set-Cookie: lang=en; Path=/foo/"
@@ -25,8 +25,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*');
2525
/// "Set-Cookie: lang=en; Path=/foo/,SID=x23"
2626
/// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23"
2727
///
28-
/// The idea behind this regex is that ",<valid token>=" is more likely to
29-
/// start a new <cookie-pair> then be part of <path-value> or <extension-av>.
28+
/// The idea behind this regex is that `,<valid token>=` is more likely to
29+
/// start a new `<cookie-pair>` than be part of `<path-value>` or
30+
/// `<extension-av>`.
3031
///
3132
/// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1
3233
var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)');

pkgs/http_profile/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >-
33
A library used by HTTP client authors to integrate with the DevTools Network
44
View.
55
repository: https://github.com/dart-lang/http/tree/master/pkgs/http_profile
6-
version: 0.1.0
6+
version: 0.1.1-wip
77

88
environment:
99
sdk: ^3.4.0

0 commit comments

Comments
 (0)