Enable and fix comment references prefer_interpolation lints
Deleted lint we're not going to enable
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 99eb230..a71a4ae 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -19,8 +19,7 @@
- await_only_futures
- camel_case_types
- cancel_subscriptions
- #- cascade_invocations
- #- comment_references
+ - comment_references
- constant_identifier_names
- control_flow_in_finally
- directives_ordering
@@ -43,7 +42,7 @@
- prefer_const_constructors
#- prefer_final_locals
- prefer_initializing_formals
- #- prefer_interpolation_to_compose_strings
+ - prefer_interpolation_to_compose_strings
- prefer_null_aware_operators
- prefer_typing_uninitialized_variables
- test_types_in_equals
diff --git a/lib/src/http_date.dart b/lib/src/http_date.dart
index ebdb4aa..76d1d2b 100644
--- a/lib/src/http_date.dart
+++ b/lib/src/http_date.dart
@@ -30,8 +30,8 @@
/// Return a HTTP-formatted string representation of [date].
///
-/// This follows [RFC 822](http://tools.ietf.org/html/rfc822) as updated by [RFC
-/// 1123](http://tools.ietf.org/html/rfc1123).
+/// This follows [RFC 822](http://tools.ietf.org/html/rfc822) as updated by
+/// [RFC 1123](http://tools.ietf.org/html/rfc1123).
String formatHttpDate(DateTime date) {
date = date.toUtc();
var buffer = StringBuffer()
@@ -55,9 +55,8 @@
/// Parses an HTTP-formatted date into a UTC [DateTime].
///
-/// This follows [RFC
-/// 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3). It will
-/// throw a [FormatException] if [date] is invalid.
+/// This follows [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3).
+/// It will throw a [FormatException] if [date] is invalid.
DateTime parseHttpDate(String date) {
return wrapFormatException('HTTP date', date, () {
var scanner = StringScanner(date);
diff --git a/lib/src/media_type.dart b/lib/src/media_type.dart
index 1d00495..2ad699a 100644
--- a/lib/src/media_type.dart
+++ b/lib/src/media_type.dart
@@ -140,7 +140,7 @@
buffer
..write('"')
..write(
- value.replaceAllMapped(_escapedChar, (match) => '\\' + match[0]))
+ value.replaceAllMapped(_escapedChar, (match) => '\\${match[0]}'))
..write('"');
} else {
buffer.write(value);
diff --git a/lib/src/scan.dart b/lib/src/scan.dart
index 2881e48..38cec49 100644
--- a/lib/src/scan.dart
+++ b/lib/src/scan.dart
@@ -2,22 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-/// A library for broadly-useful functions and regular expressions for scanning
-/// HTTP entities.
-///
-/// Many of the regular expressions come from [section 2.2 of the HTTP
-/// spec][spec].
-///
-/// [spec]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html
import 'package:string_scanner/string_scanner.dart';
-/// HTTP entities.
-///
-/// Many of the regular expressions come from [section 2.2 of the HTTP
-/// spec][spec].
-///
-/// [spec]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html
-
/// An HTTP token.
final token = RegExp(r'[^()<>@,;:"\\/[\]?={} \t\x00-\x1F\x7F]+');