Skip to content

Commit

Permalink
rfrac: enable unnecessary_parenthesis rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadeesh11 committed Dec 5, 2021
1 parent 9f70495 commit 56d932b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ linter:
non_constant_identifier_names: false

constant_identifier_names: false

unnecessary_parenthesis: true
2 changes: 1 addition & 1 deletion lib/ui/views/groups/add_assignment_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class _AddAssignmentViewState extends State<AddAssignmentView> {
value: _restrictions.contains(name),
onChanged: (value) {
if (value) {
_restrictions.add((name));
_restrictions.add(name);
} else {
_restrictions.remove(name);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/groups/update_assignment_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class _UpdateAssignmentViewState extends State<UpdateAssignmentView> {
value: _restrictions.contains(name),
onChanged: (value) {
if (value) {
_restrictions.add((name));
_restrictions.add(name);
} else {
_restrictions.remove(name);
}
Expand Down
4 changes: 2 additions & 2 deletions test/service_tests/assignments_api_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ void main() {
(_) => Future.value(Response('{"message": "reopened"}', 200)));
var _assignmentsApi = HttpAssignmentsApi();

expect((await _assignmentsApi.reopenAssignment('1')), 'reopened');
expect(await _assignmentsApi.reopenAssignment('1'), 'reopened');
});

test('When called & http client throws Exceptions', () async {
Expand Down Expand Up @@ -219,7 +219,7 @@ void main() {
Future.value(Response('{"message": "project created"}', 200)));
var _assignmentsApi = HttpAssignmentsApi();

expect((await _assignmentsApi.startAssignment('1')), 'project created');
expect(await _assignmentsApi.startAssignment('1'), 'project created');
});

test('When called & http client throws Exceptions', () async {
Expand Down
2 changes: 1 addition & 1 deletion test/service_tests/users_api_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ void main() {

ApiUtils.client = MockClient((_) =>
Future.value(Response('{"message": "instructions sent"}', 200)));
expect((await _usersApi.sendResetPasswordInstructions('[email protected]')),
expect(await _usersApi.sendResetPasswordInstructions('[email protected]'),
true);
});

Expand Down

0 comments on commit 56d932b

Please sign in to comment.