Skip to content

Commit 3fba72c

Browse files
authored
update formatting for recent lints (dart-archive/pubspec_parse#108)
1 parent ce15656 commit 3fba72c

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

pkgs/pubspec_parse/test/dependency_test.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ line 4, column 10: Unsupported value for "dep". Could not parse version "not a v
112112
test('map w/ version and hosted as Map', () {
113113
final dep = _dependency<HostedDependency>({
114114
'version': '^1.0.0',
115-
'hosted': {'name': 'hosted_name', 'url': 'https://hosted_url'}
115+
'hosted': {'name': 'hosted_name', 'url': 'https://hosted_url'},
116116
});
117117
expect(dep.version.toString(), '^1.0.0');
118118
expect(dep.hosted!.name, 'hosted_name');
@@ -124,7 +124,7 @@ line 4, column 10: Unsupported value for "dep". Could not parse version "not a v
124124
final dep = _dependency<HostedDependency>(
125125
{
126126
'version': '^1.0.0',
127-
'hosted': {'url': 'https://hosted_url'}
127+
'hosted': {'url': 'https://hosted_url'},
128128
},
129129
skipTryPub: true, // todo: Unskip once pub supports this syntax
130130
);
@@ -139,7 +139,7 @@ line 4, column 10: Unsupported value for "dep". Could not parse version "not a v
139139
_expectThrows(
140140
{
141141
'version': 'not a version',
142-
'hosted': {'name': 'hosted_name', 'url': 'hosted_url'}
142+
'hosted': {'name': 'hosted_name', 'url': 'hosted_url'},
143143
},
144144
r'''
145145
line 5, column 15: Unsupported value for "version". Could not parse version "not a version". Unknown text at "not a version".
@@ -155,7 +155,7 @@ line 5, column 15: Unsupported value for "version". Could not parse version "not
155155
{
156156
'version': '^1.0.0',
157157
'hosted': {'name': 'hosted_name', 'url': 'hosted_url'},
158-
'not_supported': null
158+
'not_supported': null,
159159
},
160160
r'''
161161
line 10, column 4: Unrecognized keys: [not_supported]; supported keys: [sdk, git, path, hosted]
@@ -286,7 +286,7 @@ line 6, column 4: Unrecognized keys: [bob]; supported keys: [sdk, git, path, hos
286286

287287
test('map', () {
288288
final dep = _dependency<GitDependency>({
289-
'git': {'url': 'url', 'path': 'path', 'ref': 'ref'}
289+
'git': {'url': 'url', 'path': 'path', 'ref': 'ref'},
290290
});
291291
expect(dep.url.toString(), 'url');
292292
expect(dep.path, 'path');
@@ -332,7 +332,7 @@ line 5, column 11: Unsupported value for "git". Must be a String or a Map.
332332
test('git - null url', () {
333333
_expectThrowsContaining(
334334
{
335-
'git': {'url': null}
335+
'git': {'url': null},
336336
},
337337
r"type 'Null' is not a subtype of type 'String'",
338338
);
@@ -341,7 +341,7 @@ line 5, column 11: Unsupported value for "git". Must be a String or a Map.
341341
test('git - int url', () {
342342
_expectThrowsContaining(
343343
{
344-
'git': {'url': 42}
344+
'git': {'url': 42},
345345
},
346346
r"type 'int' is not a subtype of type 'String'",
347347
);
@@ -407,7 +407,7 @@ void _expectThrows(Object content, String expectedError) {
407407
expectParseThrows(
408408
{
409409
'name': 'sample',
410-
'dependencies': {'dep': content}
410+
'dependencies': {'dep': content},
411411
},
412412
expectedError,
413413
);
@@ -417,7 +417,7 @@ void _expectThrowsContaining(Object content, String errorText) {
417417
expectParseThrowsContaining(
418418
{
419419
'name': 'sample',
420-
'dependencies': {'dep': content}
420+
'dependencies': {'dep': content},
421421
},
422422
errorText,
423423
);
@@ -430,7 +430,7 @@ T _dependency<T extends Dependency>(
430430
final value = parse(
431431
{
432432
...defaultPubspec,
433-
'dependencies': {'dep': content}
433+
'dependencies': {'dep': content},
434434
},
435435
skipTryPub: skipTryPub,
436436
);

pkgs/pubspec_parse/test/parse_test.dart

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void main() {
5353
],
5454
'topics': ['widget', 'button'],
5555
'screenshots': [
56-
{'description': 'my screenshot', 'path': 'path/to/screenshot'}
56+
{'description': 'my screenshot', 'path': 'path/to/screenshot'},
5757
],
5858
});
5959
expect(value.name, 'sample');
@@ -91,7 +91,7 @@ void main() {
9191
'environment': {
9292
'sdk': '>=2.12.0 <3.0.0',
9393
'bob': null,
94-
}
94+
},
9595
},
9696
skipTryPub: true,
9797
);
@@ -135,7 +135,7 @@ line 3, column 16: Unsupported value for "publish_to". Must be an http or https
135135
null: null,
136136
'http': 'http://example.com',
137137
'https': 'https://example.com',
138-
'none': 'none'
138+
'none': 'none',
139139
}.entries) {
140140
test('can be ${entry.key}', () {
141141
final value = parse({
@@ -160,7 +160,7 @@ line 3, column 16: Unsupported value for "publish_to". Must be an http or https
160160
test('one author, via authors', () {
161161
final value = parse({
162162
...defaultPubspec,
163-
'authors': ['[email protected]']
163+
'authors': ['[email protected]'],
164164
});
165165
expect(value.author, '[email protected]');
166166
expect(value.authors, ['[email protected]']);
@@ -169,7 +169,7 @@ line 3, column 16: Unsupported value for "publish_to". Must be an http or https
169169
test('many authors', () {
170170
final value = parse({
171171
...defaultPubspec,
172-
172+
173173
});
174174
expect(value.author, isNull);
175175
expect(value.authors, ['[email protected]', '[email protected]']);
@@ -179,7 +179,7 @@ line 3, column 16: Unsupported value for "publish_to". Must be an http or https
179179
final value = parse({
180180
...defaultPubspec,
181181
'author': '[email protected]',
182-
'authors': ['[email protected]']
182+
'authors': ['[email protected]'],
183183
});
184184
expect(value.author, isNull);
185185
expect(value.authors, ['[email protected]', '[email protected]']);
@@ -189,7 +189,7 @@ line 3, column 16: Unsupported value for "publish_to". Must be an http or https
189189
final value = parse({
190190
...defaultPubspec,
191191
'author': '[email protected]',
192-
192+
193193
});
194194
expect(value.author, '[email protected]');
195195
expect(value.authors, ['[email protected]']);
@@ -269,7 +269,7 @@ line 2, column 10: Unsupported value for "name". "name" cannot be empty.
269269
expectParseThrows(
270270
{
271271
'name': 'sample',
272-
'environment': {'dart': 'cool'}
272+
'environment': {'dart': 'cool'},
273273
},
274274
r'''
275275
line 4, column 3: Use "sdk" to for Dart SDK constraints.
@@ -284,7 +284,7 @@ line 4, column 3: Use "sdk" to for Dart SDK constraints.
284284
expectParseThrows(
285285
{
286286
'name': 'sample',
287-
'environment': {'sdk': 42}
287+
'environment': {'sdk': 42},
288288
},
289289
r'''
290290
line 4, column 10: Unsupported value for "sdk". `42` is not a String.
@@ -313,7 +313,7 @@ line 3, column 13: Unsupported value for "version". Could not parse "invalid".
313313
expectParseThrows(
314314
{
315315
'name': 'sample',
316-
'environment': {'sdk': 'silly'}
316+
'environment': {'sdk': 'silly'},
317317
},
318318
r'''
319319
line 4, column 10: Unsupported value for "sdk". Could not parse version "silly". Unknown text at "silly".
@@ -430,7 +430,7 @@ line 6, column 13: Unsupported value for "funding". Illegal scheme character at
430430
final value = parse({
431431
...defaultPubspec,
432432
'screenshots': [
433-
{'description': 'my screenshot', 'path': 'path/to/screenshot'}
433+
{'description': 'my screenshot', 'path': 'path/to/screenshot'},
434434
],
435435
});
436436
expect(value.screenshots, hasLength(1));
@@ -445,7 +445,7 @@ line 6, column 13: Unsupported value for "funding". Illegal scheme character at
445445
{'description': 'my screenshot', 'path': 'path/to/screenshot'},
446446
{
447447
'description': 'my second screenshot',
448-
'path': 'path/to/screenshot2'
448+
'path': 'path/to/screenshot2',
449449
},
450450
],
451451
});
@@ -464,7 +464,7 @@ line 6, column 13: Unsupported value for "funding". Illegal scheme character at
464464
{
465465
'description': 'my screenshot',
466466
'path': 'path/to/screenshot',
467-
'extraKey': 'not important'
467+
'extraKey': 'not important',
468468
},
469469
'not a screenshot',
470470
],
@@ -659,7 +659,7 @@ line 1, column 1: Not a map
659659
'name': 'sample',
660660
'dependencies': {
661661
'foo': {
662-
'git': {'url': 1}
662+
'git': {'url': 1},
663663
},
664664
},
665665
'issue_tracker': {'x': 'y'},

0 commit comments

Comments
 (0)