blob: f2bb88abfa091b78a28afe379d8531d9ee7f8b22 [file] [log] [blame]
# Change analysis_options.yaml and analysis_options_presubmit.yaml
# together.
include: package:lints/recommended.yaml
analyzer:
errors:
todo: ignore
unused_import: warning
unused_shown_name: warning
### Extra ignores for presubmit
deprecated_member_use: ignore
deprecated_member_use_from_same_package: ignore
### Temporary presubmit ignore for NNBD migration
import_of_legacy_library_into_null_safe: ignore
language:
strict-raw-types: true
exclude:
- 'doc/**'
- 'lib/src/third_party/pkg/**'
- 'lib/templates/*.html'
- 'pub.dartlang.org/**'
# These have a lot of lint.
- 'testing/test_package/**'
- 'testing/test_package_custom_templates/**'
- 'testing/test_package_experiments/**'
- 'testing/test_package_extensions/**'
- 'testing/test_package_imported/**'
- 'testing/test_package_options/**'
# This package imports flutter, which is perhaps not found by the base `dart analyze` tool.
- 'testing/flutter_packages/test_package_flutter_plugin/**'
# This package is meant to mock the sky_engine package.
- 'testing/sky_engine/**'
# These packages have compile-time errors.
- 'testing/test_package_bad/**'
linter:
rules:
- always_declare_return_types
- always_put_required_named_parameters_first
- avoid_bool_literals_in_conditional_expressions
- avoid_dynamic_calls
- avoid_slow_async_io
- avoid_unused_constructor_parameters
- depend_on_referenced_packages
- directives_ordering
- eol_at_end_of_file
- no_adjacent_strings_in_list
- omit_local_variable_types
- package_api_docs
- prefer_asserts_in_initializer_lists
- prefer_null_aware_method_calls
- prefer_single_quotes
- sort_child_properties_last
- sort_pub_dependencies
- type_annotate_public_apis
- unawaited_futures
- unnecessary_null_aware_assignments