Skip to content

Commit ff99503

Browse files
committed
Reenable hash and equals lint – and disable it selectively
1 parent d94eeeb commit ff99503

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ linter:
1313
- comment_references
1414
- control_flow_in_finally
1515
- empty_statements
16-
#- hash_and_equals
16+
- hash_and_equals
1717
- implementation_imports
1818
- test_types_in_equals
1919
- throw_in_finally

test/test_files/bathtub.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: annotate_overrides
5+
// ignore_for_file: annotate_overrides, hash_and_equals
66
library json_serializable.test.bathtub;
77

88
import 'package:json_serializable/annotations.dart';

test/test_files/json_test_example.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: annotate_overrides
5+
// ignore_for_file: annotate_overrides, hash_and_equals
66
library json_serializable.test.example;
77

88
import 'dart:collection';
@@ -30,7 +30,8 @@ class Person extends Object with _$PersonSerializerMixin {
3030
firstName == other.firstName &&
3131
middleName == other.middleName &&
3232
lastName == other.lastName &&
33-
dateOfBirth == other.dateOfBirth;
33+
dateOfBirth == other.dateOfBirth &&
34+
house == other.house;
3435
}
3536

3637
enum Category { top, bottom, strange, charmed, up, down }

test/test_files/kitchen_sink.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: annotate_overrides
5+
// ignore_for_file: annotate_overrides, hash_and_equals
66
library json_serializable.test.kitche_sink;
77

88
import 'package:collection/collection.dart';

0 commit comments

Comments
 (0)