Files
sdk/pkg/analyzer/analysis_options.yaml
T
Sam Rawlins e139fb1527 Tidy some lint issues in analyzer
* Move many identifiers from snake_case or SCREAMING_SNAKE_CASE to
  camelCase. I think I restricted the changes to private API.
* Add an ignore in generated files for constant_identifier_names;
  we often just mirror names found in YAML files or whatever, where
  things are not necessarily named according to Effective Dart
  standards.
* Avoid some implementation imports which I think were accidental.
* Use single quotes in some more places.

Bug: https://github.com/dart-lang/sdk/issues/48784
Change-Id: I439fe50cb9f8f8f5e9c74ce594aea15e394ee7da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-08-10 21:23:21 +00:00

47 lines
1.7 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
# There are about 10k violations in test/ due to missing return types on
# test methods. It would be nice to mark this code as
# "ignored for test/**/*.dart".
inference_failure_on_function_return_type: 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
# We sometimes name test classes with an underscore, and have a consistent
# practice of doing so. We do not have an problems of naming classes with
# snake_case, so we're not missing much by disabling it. Re-enable when we
# can ignore a lint rule for a certain path.
camel_case_types: ignore
constant_identifier_names: ignore
hash_and_equals: ignore
non_constant_identifier_names: ignore
implementation_imports: ignore
library_private_types_in_public_api: ignore
overridden_fields: ignore
provide_deprecation_message: ignore
language:
strict-inference: true
linter:
rules:
- always_use_package_imports
- avoid_dynamic_calls
- avoid_unused_constructor_parameters
- await_only_futures
- depend_on_referenced_packages
- unawaited_futures
- unnecessary_parenthesis
- use_super_parameters