Skip to content

Commit

Permalink
fix(lints): linter rules #149 (#179)
Browse files Browse the repository at this point in the history
* rfrac: enabled unnecessary_parenthesis and avoid_redundant_argument_values rules.

* rfrac: Removed unused imports.

* enabled unnecessary_parenthesis.
  • Loading branch information
Aadeesh11 authored Dec 24, 2021
1 parent 8b50d69 commit ba90d7a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ linter:
# Util classes
avoid_classes_with_only_static_members: false

avoid_redundant_argument_values: false

non_constant_identifier_names: false

constant_identifier_names: false
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 ba90d7a

Please sign in to comment.