Skip to content

Commit 4fcafee

Browse files
authored
chore: add trailing comma (#79)
1 parent 4bcf1e0 commit 4fcafee

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

example/test/integration/completion_integration_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void main() {
203203
'--no-flag': null,
204204
'--inverseflag': 'A flag that the default value is true',
205205
'--no-inverseflag': 'A flag that the default value is true',
206-
'--trueflag': 'A flag that cannot be negated'
206+
'--trueflag': 'A flag that cannot be negated',
207207
};
208208

209209
final allAbbreviationsInThisLevel = <String, String?>{
@@ -213,7 +213,7 @@ void main() {
213213
'-n': 'An continuous option that can be passed multiple times',
214214
'-f': null,
215215
'-i': 'A flag that the default value is true',
216-
'-t': 'A flag that cannot be negated'
216+
'-t': 'A flag that cannot be negated',
217217
};
218218

219219
group('empty ', () {
@@ -315,7 +315,7 @@ void main() {
315315
'An option that starts with "no" just to make confusion with '
316316
'negated flags',
317317
'--no-flag': null,
318-
'--no-inverseflag': 'A flag that the default value is true'
318+
'--no-inverseflag': 'A flag that the default value is true',
319319
}),
320320
);
321321
});
@@ -325,7 +325,7 @@ void main() {
325325
'example_cli some_command --no-i',
326326
suggests({
327327
'--no-itIsAFlag': null,
328-
'--no-inverseflag': 'A flag that the default value is true'
328+
'--no-inverseflag': 'A flag that the default value is true',
329329
}),
330330
);
331331
});
@@ -642,7 +642,7 @@ void main() {
642642
'fii': 'fii help',
643643
'bar': 'bar help',
644644
'fee': 'fee help',
645-
'i have space': 'an allowed option with space on it'
645+
'i have space': 'an allowed option with space on it',
646646
}),
647647
);
648648
});

lib/src/parser/completion_result.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class OptionValuesCompletionResult extends CompletionResult {
248248
if (includeAbbrName)
249249
'-$optionName$allowed': option?.allowedHelp?[allowed]
250250
else
251-
allowed: option?.allowedHelp?[allowed]
251+
allowed: option?.allowedHelp?[allowed],
252252
};
253253
}
254254
}

test/src/command_runner/commands/handle_completion_command_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void main() {
7878
'SHELL': '/foo/bar/zsh',
7979
'COMP_LINE': line,
8080
'COMP_POINT': '${line.length}',
81-
'COMP_CWORD': '2'
81+
'COMP_CWORD': '2',
8282
};
8383
await commandRunner.run(['completion']);
8484

@@ -99,7 +99,7 @@ subcommand:level 1
9999
'SHELL': '/foo/bar/zsh',
100100
'COMP_LINE': line,
101101
'COMP_POINT': '${line.length}',
102-
'COMP_CWORD': '2'
102+
'COMP_CWORD': '2',
103103
};
104104
await commandRunner.run(['completion']);
105105

test/src/parser/completion_result_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void main() {
139139
{
140140
'command1': 'yay command 1',
141141
'command2': 'yay command 2',
142-
'command_not_weird': 'yay weird command'
142+
'command_not_weird': 'yay weird command',
143143
},
144144
);
145145
},

test/src/parser/completion_state_test.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void main() {
88
final environment = <String, String>{
99
'COMP_LINE': 'example_cli some_command --discrete foo',
1010
'COMP_POINT': '39',
11-
'COMP_CWORD': '3'
11+
'COMP_CWORD': '3',
1212
};
1313
final state = CompletionState.fromEnvironment(environment);
1414
expect(state, isNotNull);
@@ -26,7 +26,7 @@ void main() {
2626
final environment = <String, String>{
2727
'COMP_LINE': 'example_cli some_command --discrete foo',
2828
'COMP_POINT': '39',
29-
'COMP_CWORD': '3'
29+
'COMP_CWORD': '3',
3030
};
3131
final state = CompletionState.fromEnvironment(environment);
3232
final state2 = CompletionState.fromEnvironment(environment);
@@ -47,7 +47,7 @@ void main() {
4747

4848
test('returns null when only COMP_LINE is set', () {
4949
final environment = <String, String>{
50-
'COMP_LINE': 'example_cli some_command --discrete foo'
50+
'COMP_LINE': 'example_cli some_command --discrete foo',
5151
};
5252
expect(
5353
CompletionState.fromEnvironment(environment),
@@ -86,7 +86,7 @@ void main() {
8686
final environment = <String, String>{
8787
'COMP_LINE': 'example_cli some_command --discrete foo',
8888
'COMP_POINT': '0',
89-
'COMP_CWORD': '0'
89+
'COMP_CWORD': '0',
9090
};
9191
expect(
9292
CompletionState.fromEnvironment(environment),
@@ -98,7 +98,7 @@ void main() {
9898
final environment = <String, String>{
9999
'COMP_LINE': 'example_cli some_command -- --discrete foo',
100100
'COMP_POINT': '42',
101-
'COMP_CWORD': '4'
101+
'COMP_CWORD': '4',
102102
};
103103
expect(
104104
CompletionState.fromEnvironment(environment),

0 commit comments

Comments
 (0)