dart-sdk/pkg/analyzer_cli/analysis_options.yaml
Sam Rawlins 5f8ef7be53 Enable new linter rules in analyzer packages
Change-Id: Id0182648a347a05cbf6e1483a0afe94219268853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-21 23:02:38 +00:00

47 lines
1.3 KiB
YAML

include: package:lints/recommended.yaml
analyzer:
language:
strict-casts: true
strict-inference: true
exclude:
- test/data/**
linter:
rules:
always_declare_return_types: true
avoid_empty_else: true
avoid_relative_lib_imports: true
avoid_shadowing_type_parameters: true
avoid_types_as_parameter_names: true
avoid_unused_constructor_parameters: true
camel_case_extensions: true
collection_methods_unrelated_type: true
curly_braces_in_flow_control_structures: true
# Enable when we require Dart 2.19.0.
#- dangling_library_doc_comments
depend_on_referenced_packages: true
directives_ordering: true
empty_catches: true
enable_null_safety: true
# We import heavily from package:analyzer/src.
implementation_imports: false
implicit_call_tearoffs: true
library_annotations: true
# This rule does not work well with package:test_reflective_loader.
no_duplicate_case_values: true
non_constant_identifier_names: false
omit_local_variable_types: true
prefer_is_empty: true
prefer_is_not_empty: true
prefer_iterable_whereType: true
prefer_single_quotes: true
unawaited_futures: true
unnecessary_library_directive: true
unnecessary_parenthesis: true
unreachable_from_main: true
unrelated_type_equality_checks: true