Skip to content

Commit 8342cf0

Browse files
authored
Enable and fix lint prefer_typing_uninitialized_variables (#312)
1 parent 4dfcbd8 commit 8342cf0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ linter:
5555
- prefer_is_not_empty
5656
- prefer_null_aware_operators
5757
- prefer_single_quotes
58-
# prefer_typing_uninitialized_variables
58+
- prefer_typing_uninitialized_variables
5959
- recursive_getters
6060
- slash_for_doc_comments
6161
- test_types_in_equals

test/io/multipart_test.dart

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

1616
void main() {
17-
var tempDir;
17+
Directory tempDir;
1818
setUp(() {
1919
tempDir = Directory.systemTemp.createTempSync('http_test_');
2020
});

test/io/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Future startServer() {
7373
ContentType('application', 'json', charset: outputEncoding.name);
7474
response.headers.set('single', 'value');
7575

76-
var requestBody;
76+
dynamic requestBody;
7777
if (requestBodyBytes.isEmpty) {
7878
requestBody = null;
7979
} else if (request.headers.contentType?.charset != null) {

test/utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class _Parse extends Matcher {
5151
bool matches(item, Map matchState) {
5252
if (item is! String) return false;
5353

54-
var parsed;
54+
dynamic parsed;
5555
try {
5656
parsed = json.decode(item);
5757
} catch (e) {

0 commit comments

Comments
 (0)