Skip to content

Commit

Permalink
chore: add trailing comma (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo committed Sep 19, 2023
1 parent 4bcf1e0 commit 4fcafee
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions example/test/integration/completion_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void main() {
'--no-flag': null,
'--inverseflag': 'A flag that the default value is true',
'--no-inverseflag': 'A flag that the default value is true',
'--trueflag': 'A flag that cannot be negated'
'--trueflag': 'A flag that cannot be negated',
};

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

group('empty ', () {
Expand Down Expand Up @@ -315,7 +315,7 @@ void main() {
'An option that starts with "no" just to make confusion with '
'negated flags',
'--no-flag': null,
'--no-inverseflag': 'A flag that the default value is true'
'--no-inverseflag': 'A flag that the default value is true',
}),
);
});
Expand All @@ -325,7 +325,7 @@ void main() {
'example_cli some_command --no-i',
suggests({
'--no-itIsAFlag': null,
'--no-inverseflag': 'A flag that the default value is true'
'--no-inverseflag': 'A flag that the default value is true',
}),
);
});
Expand Down Expand Up @@ -642,7 +642,7 @@ void main() {
'fii': 'fii help',
'bar': 'bar help',
'fee': 'fee help',
'i have space': 'an allowed option with space on it'
'i have space': 'an allowed option with space on it',
}),
);
});
Expand Down
2 changes: 1 addition & 1 deletion lib/src/parser/completion_result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class OptionValuesCompletionResult extends CompletionResult {
if (includeAbbrName)
'-$optionName$allowed': option?.allowedHelp?[allowed]
else
allowed: option?.allowedHelp?[allowed]
allowed: option?.allowedHelp?[allowed],
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void main() {
'SHELL': '/foo/bar/zsh',
'COMP_LINE': line,
'COMP_POINT': '${line.length}',
'COMP_CWORD': '2'
'COMP_CWORD': '2',
};
await commandRunner.run(['completion']);

Expand All @@ -99,7 +99,7 @@ subcommand:level 1
'SHELL': '/foo/bar/zsh',
'COMP_LINE': line,
'COMP_POINT': '${line.length}',
'COMP_CWORD': '2'
'COMP_CWORD': '2',
};
await commandRunner.run(['completion']);

Expand Down
2 changes: 1 addition & 1 deletion test/src/parser/completion_result_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void main() {
{
'command1': 'yay command 1',
'command2': 'yay command 2',
'command_not_weird': 'yay weird command'
'command_not_weird': 'yay weird command',
},
);
},
Expand Down
10 changes: 5 additions & 5 deletions test/src/parser/completion_state_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void main() {
final environment = <String, String>{
'COMP_LINE': 'example_cli some_command --discrete foo',
'COMP_POINT': '39',
'COMP_CWORD': '3'
'COMP_CWORD': '3',
};
final state = CompletionState.fromEnvironment(environment);
expect(state, isNotNull);
Expand All @@ -26,7 +26,7 @@ void main() {
final environment = <String, String>{
'COMP_LINE': 'example_cli some_command --discrete foo',
'COMP_POINT': '39',
'COMP_CWORD': '3'
'COMP_CWORD': '3',
};
final state = CompletionState.fromEnvironment(environment);
final state2 = CompletionState.fromEnvironment(environment);
Expand All @@ -47,7 +47,7 @@ void main() {

test('returns null when only COMP_LINE is set', () {
final environment = <String, String>{
'COMP_LINE': 'example_cli some_command --discrete foo'
'COMP_LINE': 'example_cli some_command --discrete foo',
};
expect(
CompletionState.fromEnvironment(environment),
Expand Down Expand Up @@ -86,7 +86,7 @@ void main() {
final environment = <String, String>{
'COMP_LINE': 'example_cli some_command --discrete foo',
'COMP_POINT': '0',
'COMP_CWORD': '0'
'COMP_CWORD': '0',
};
expect(
CompletionState.fromEnvironment(environment),
Expand All @@ -98,7 +98,7 @@ void main() {
final environment = <String, String>{
'COMP_LINE': 'example_cli some_command -- --discrete foo',
'COMP_POINT': '42',
'COMP_CWORD': '4'
'COMP_CWORD': '4',
};
expect(
CompletionState.fromEnvironment(environment),
Expand Down

0 comments on commit 4fcafee

Please sign in to comment.