dart-sdk/pkg/analyzer_plugin/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

31 lines
869 B
YAML

include: package:lints/recommended.yaml
analyzer:
language:
strict-casts: true
linter:
rules:
# In addition to lints/recommended:
always_declare_return_types: true
collection_methods_unrelated_type: true
# Enable when we require Dart 2.19.0.
#dangling_library_doc_comments: true
depend_on_referenced_packages: true
enable_null_safety: true
implicit_call_tearoffs: true
library_annotations: true
omit_local_variable_types: true
prefer_single_quotes: true
unawaited_futures: true
unnecessary_library_directive: true
unnecessary_parenthesis: true
unreachable_from_main: true
# Remove from lints/recommended:
constant_identifier_names: false
implementation_imports: false
non_constant_identifier_names: false
# Existing violations (3)
library_private_types_in_public_api: false