Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove avoid_null_checks_in_equality_operators #124

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ Below is a list of rules that are not enabled by default together with the reaso
| [`avoid_annotating_with_dynamic`](https://dart.dev/tools/linter-rules/avoid_annotating_with_dynamic) | Not specified |
| [`avoid_catches_without_on_clauses`](https://dart.dev/tools/linter-rules/avoid_catches_without_on_clauses) | [Has unresolved false positives](https://github.com/dart-lang/linter/issues/3023) |
| [`avoid_classes_with_only_static_members`](https://dart.dev/tools/linter-rules/avoid_classes_with_only_static_members) | Not specified |
| [`avoid_futureor_void`](https://dart.dev/tools/linter-rules/avoid_futureor_void) | Not specified |
| [`avoid_implementing_value_types`](https://dart.dev/tools/linter-rules/avoid_implementing_value_types) | Not specified |
| [`avoid_null_checks_in_equality_operators`](https://dart.dev/tools/linter-rules/avoid_null_checks_in_equality_operators) | Not specified |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any exclusion reason for this removal we could add?

| [`avoid_types_on_closure_parameters`](https://dart.dev/tools/linter-rules/avoid_types_on_closure_parameters) | Not specified |
| [`close_sinks`](https://dart.dev/tools/linter-rules/close_sinks) | [Has unresolved false positives](https://github.com/dart-lang/linter/issues/1381) |
| [`deprecated_member_use_from_same_package`](https://dart.dev/tools/linter-rules/deprecated_member_use_from_same_package) | Not specified |
Expand All @@ -111,6 +113,8 @@ Below is a list of rules that are not enabled by default together with the reaso
| [`library_names`](https://dart.dev/tools/linter-rules/library_names) | [Superseded by `unnecessary_library_name`](https://github.com/dart-lang/lints/issues/172) |
| [`matching_super_parameters`](https://dart.dev/tools/linter-rules/matching_super_parameters) | Not specified |
| [`no_literal_bool_comparisons`](https://dart.dev/tools/linter-rules/no_literal_bool_comparisons) | Not specified |
| [`omit_obvious_local_variable_types`](https://dart.dev/tools/linter-rules/omit_obvious_local_variable_types) | Not specified |
| [`package_api_docs`](https://dart.dev/tools/linter-rules/package_api_docs) | Has been deprecated and [will be removed](https://github.com/dart-lang/linter/issues/5107) |
| [`package_prefixed_library_names`](https://dart.dev/tools/linter-rules/package_prefixed_library_names) | [Broken; superseded by `unnecessary_library_name`](https://github.com/dart-lang/lints/issues/172) |
| [`prefer_double_quotes`](https://dart.dev/tools/linter-rules/prefer_double_quotes) | Incompatible with [prefer_single_quotes](https://dart.dev/tools/linter-rules/prefer_single_quotes) |
| [`prefer_expression_function_bodies`](https://dart.dev/tools/linter-rules/prefer_expression_function_bodies) | Not specified |
Expand All @@ -119,13 +123,13 @@ Below is a list of rules that are not enabled by default together with the reaso
| [`prefer_mixin`](https://dart.dev/tools/linter-rules/prefer_mixin) | Not specified |
| [`prefer_relative_imports`](https://dart.dev/tools/linter-rules/prefer_relative_imports) | Incompatible with [always_use_package_imports](https://dart.dev/tools/linter-rules/always_use_package_imports) |
| [`prefer_void_to_null`](https://dart.dev/tools/linter-rules/prefer_void_to_null) | [Has unresolved false positives](https://github.com/dart-lang/linter/issues/4758) |
| [`specify_nonobvious_local_variable_types`](https://dart.dev/tools/linter-rules/specify_nonobvious_local_variable_types) | Not specified |
| [`unintended_html_in_doc_comment`](https://dart.dev/tools/linter-rules/unintended_html_in_doc_comment) | [Pending recommendation](https://github.com/dart-lang/lints/issues/192) |
| [`unnecessary_final`](https://dart.dev/tools/linter-rules/unnecessary_final) | Incompatible with [prefer_final_locals](https://dart.dev/tools/linter-rules/prefer_final_locals) |
| [`unnecessary_null_aware_operator_on_extension_on_nullable`](https://dart.dev/tools/linter-rules/unnecessary_null_aware_operator_on_extension_on_nullable) | Not specified |
| [`unreachable_from_main`](https://dart.dev/tools/linter-rules/unreachable_from_main) | Not specified |
| [`unsafe_html`](https://dart.dev/tools/linter-rules/unsafe_html) | Not specified |
| [`use_decorated_box`](https://dart.dev/tools/linter-rules/use_decorated_box) | [Has unresolved malfunctions](https://github.com/dart-lang/linter/issues/3286) |
| [`package_api_docs`](https://dart.dev/tools/linter-rules/package_api_docs) | Has been deprecated and [will be removed](https://github.com/dart-lang/linter/issues/5107) |
| [`use_truncating_division`](https://dart.dev/tools/linter-rules/use_truncating_division) | Not specified |

<!-- end:excluded_rules_table -->

Expand Down
1 change: 0 additions & 1 deletion lib/analysis_options.7.0.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ linter:
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_multiple_declarations_per_line
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_print
- avoid_private_typedef_functions
Expand Down
10 changes: 7 additions & 3 deletions tool/linter_rules/exclusion_reasons.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"avoid_annotating_with_dynamic": "Not specified",
"avoid_catches_without_on_clauses": "[Has unresolved false positives](https://github.com/dart-lang/linter/issues/3023)",
"avoid_classes_with_only_static_members": "Not specified",
"avoid_futureor_void": "Not specified",
"avoid_implementing_value_types": "Not specified",
"avoid_null_checks_in_equality_operators": "Not specified",
"avoid_types_on_closure_parameters": "Not specified",
"close_sinks": "[Has unresolved false positives](https://github.com/dart-lang/linter/issues/1381)",
"deprecated_member_use_from_same_package": "Not specified",
Expand All @@ -17,6 +19,8 @@
"library_names": "[Superseded by `unnecessary_library_name`](https://github.com/dart-lang/lints/issues/172)",
"matching_super_parameters": "Not specified",
"no_literal_bool_comparisons": "Not specified",
"omit_obvious_local_variable_types": "Not specified",
"package_api_docs": "Has been deprecated and [will be removed](https://github.com/dart-lang/linter/issues/5107)",
"package_prefixed_library_names": "[Broken; superseded by `unnecessary_library_name`](https://github.com/dart-lang/lints/issues/172)",
"prefer_double_quotes": "Incompatible with [prefer_single_quotes](https://dart.dev/tools/linter-rules/prefer_single_quotes)",
"prefer_expression_function_bodies": "Not specified",
Expand All @@ -25,11 +29,11 @@
"prefer_mixin": "Not specified",
"prefer_relative_imports": "Incompatible with [always_use_package_imports](https://dart.dev/tools/linter-rules/always_use_package_imports)",
"prefer_void_to_null": "[Has unresolved false positives](https://github.com/dart-lang/linter/issues/4758)",
"specify_nonobvious_local_variable_types": "Not specified",
"unintended_html_in_doc_comment": "[Pending recommendation](https://github.com/dart-lang/lints/issues/192)",
"unnecessary_final": "Incompatible with [prefer_final_locals](https://dart.dev/tools/linter-rules/prefer_final_locals)",
"unnecessary_null_aware_operator_on_extension_on_nullable": "Not specified",
"unreachable_from_main": "Not specified",
"unsafe_html": "Not specified",
"use_decorated_box": "[Has unresolved malfunctions](https://github.com/dart-lang/linter/issues/3286)",
"package_api_docs": "Has been deprecated and [will be removed](https://github.com/dart-lang/linter/issues/5107)"
}
"use_truncating_division": "Not specified"
}
2 changes: 1 addition & 1 deletion tool/linter_rules/lib/src/linter_rules_reasons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Future<LinterRulesReasons> readExclusionReasons() async {
/// Writes all the reasons for disabling a rule.
Future<void> writeExclusionReasons(LinterRulesReasons reasons) async {
final file = File(_reasonsFilePath);
final json = jsonEncode(reasons);
final json = const JsonEncoder.withIndent(' ').convert(reasons);
await file.writeAsString(json);
}