07669ab650
Removes the diagnostic codes `HintCode.deprecatedMemberUseFromSamePackage` and `HintCode.deprecatedMemberUseFromSamePackageWithMessage`, and the logic for reporting them. These hint codes have been replaced with lints. Removing these diagnostic codes avoids an ambiguity between `HintCode.deprecatedMemberUseFromSamePackageWithMessage` and `LinterLintCode.deprecatedMemberUseFromSamePackageWithMessage`. Avoiding ambiguities like these is important, because in many cases the user only sees the diagnostic name; they don't see the class it's in. For example, `ignore:` comments just give the diagnostic name, and the web page https://dart.dev/tools/diagnostics only shows diagnostic names. In the future I intend to add an error check to the analyzer diagnostic code generator, to ensure that there are no ambiguities like these. This CL is a prerequisite for adding the error check. To avoid this change causing `ignore:` comments to become unnecessary (which would break bots), I've enabled the lint `deprecated_member_use_from_same_package` in `pkg/analysis_server`, `pkg/analyzer`, `pkg/compiler`, and `pkg/linter`. After this change lands, I will work with the owners of those packages to determine whether it's better to keep the lint enabled or to remove the `ignore:` comments. Change-Id: I6a6a6964aa7f69a41b9b815e0f50fc638898f104 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/455541 Reviewed-by: Mayank Patke <fishythefish@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
include: package:lints/recommended.yaml
|
|
|
|
analyzer:
|
|
errors:
|
|
# Increase the severity of the unused_import hint.
|
|
unused_import: warning
|
|
|
|
# "strict-inference" is enabled, but "unused" parameters named '_' are
|
|
# still reported. Re-evaluate after
|
|
# https://github.com/dart-lang/language/pull/599 and a functional fix land.
|
|
inference_failure_on_untyped_parameter: ignore
|
|
|
|
# Lints from the recommended set that conflict w/ analyzer style or will
|
|
# require some work to reach compliance.
|
|
# See: https://github.com/dart-lang/sdk/issues/48784
|
|
avoid_renaming_method_parameters: ignore
|
|
|
|
# More than 500 violations in lib/.
|
|
constant_identifier_names: ignore
|
|
|
|
# About 10 violations in lib/.
|
|
hash_and_equals: ignore
|
|
|
|
# More than 500 violations in lib/.
|
|
non_constant_identifier_names: ignore
|
|
|
|
# This package imports much of the implementation libraries of the
|
|
# '_fe_analyzer_shared' package, because it is tightly integrated. This
|
|
# will not likely change any time soon.
|
|
implementation_imports: ignore
|
|
|
|
# About 20 violations of this in lib/.
|
|
library_private_types_in_public_api: ignore
|
|
|
|
# About 30 violations of this in lib/.
|
|
provide_deprecation_message: ignore
|
|
|
|
# ~3,500 violations in test/.
|
|
strict_top_level_inference: ignore
|
|
|
|
# Ignoring this for all developers means developers don't need to ignore
|
|
# TODOs in their IDE settings.
|
|
todo: ignore
|
|
|
|
language:
|
|
strict-casts: true
|
|
strict-inference: true
|
|
|
|
linter:
|
|
rules:
|
|
- always_use_package_imports
|
|
- analyzer_element_model_tracking
|
|
- analyzer_public_api
|
|
- avoid_dynamic_calls
|
|
- avoid_redundant_argument_values
|
|
- avoid_unused_constructor_parameters
|
|
- comment_references
|
|
- deprecated_member_use_from_same_package
|
|
- discarded_futures
|
|
- flutter_style_todos
|
|
- no_literal_bool_comparisons
|
|
- unawaited_futures
|
|
- unnecessary_breaks
|
|
- unnecessary_final
|
|
- unnecessary_ignore
|
|
- unnecessary_library_directive
|
|
- unnecessary_parenthesis
|