-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[ci] Clean up analysis options #7068
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,21 @@ | ||
# This is a copy (as of March 2021) of flutter/flutter's analysis_options file, | ||
# with minimal changes for this repository. The goal is to move toward using a | ||
# shared set of analysis options as much as possible, and eventually a shared | ||
# file. | ||
|
||
# Specify analysis options. | ||
# | ||
# For a list of lints, see: http://dart-lang.github.io/linter/lints/ | ||
# See the configuration guide for more | ||
# https://github.com/dart-lang/sdk/tree/main/pkg/analyzer#configuring-the-analyzer | ||
# | ||
# There are other similar analysis options files in the flutter repos, | ||
# which should be kept in sync with this file: | ||
# | ||
# - analysis_options.yaml (this file) | ||
# - packages/flutter/lib/analysis_options_user.yaml | ||
# - https://github.com/flutter/flutter/blob/master/analysis_options.yaml | ||
# - https://github.com/flutter/engine/blob/main/analysis_options.yaml | ||
# - https://github.com/flutter/packages/blob/main/analysis_options.yaml | ||
# | ||
# This file contains the analysis options used for code in the flutter/plugins | ||
# repository. | ||
# This file is a copy of analysis_options.yaml from flutter repo | ||
# as of 2022-07-27, but with some modifications marked with | ||
# "DIFFERENT FROM FLUTTER/FLUTTER" below. The file is expected to | ||
# be kept in sync with the master file from the flutter repo. | ||
|
||
analyzer: | ||
language: | ||
strict-casts: true | ||
strict-raw-types: true | ||
errors: | ||
# treat missing required parameters as a warning (not a hint) | ||
missing_required_param: warning | ||
# treat missing returns as a warning (not a hint) | ||
missing_return: warning | ||
# allow having TODO comments in the code | ||
todo: ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See flutter/flutter#108747 where these were removed from flutter/flutter (where we got them originally). |
||
# allow self-reference to deprecated members (we do this because otherwise we have | ||
# to annotate every member in every test, assert, etc, when we deprecate something) | ||
deprecated_member_use_from_same_package: ignore | ||
# Ignore analyzer hints for updating pubspecs when using Future or | ||
# Stream and not importing dart:async | ||
# Please see https://github.com/flutter/flutter/pull/24528 for details. | ||
sdk_version_async_exported_from_core: ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer necessary. |
||
# Turned off until null-safe rollout is complete. | ||
unnecessary_null_comparison: ignore | ||
### Local flutter/plugins changes ### | ||
# Allow null checks for as long as mixed mode is officially supported. | ||
always_require_non_null_named_parameters: false # not needed with nnbd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only applies to pre-NNBD code, which we don't have any of. |
||
exclude: | ||
exclude: # DIFFERENT FROM FLUTTER/FLUTTER | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. flutter/packages (correctly) has this annotation, so adding it to match. |
||
# Ignore generated files | ||
- '**/*.g.dart' | ||
- '**/*.mocks.dart' # Mockito @GenerateMocks | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything from here up is just comment differences from flutter/packages; aligning them help reduce noise in my diffs as I'm finishing the pre-merge alignment.