<!-- start_original_pr_link -->
Reverts: flutter/flutter#175679
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Linux linux_unopt is now timing out in postsubmit
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: bkonyi
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {srawlins}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
The `flutter_analyzer_plugin` implements rules previously enforced by
the `dev/bots/analyze.dart` check run on the CI, allowing for earlier
detection of custom lint violations before a change is uploaded for
review.
Currently, the plugin implements the following rules:
- avoid_future_catch_error
- no_double_clamp
- no_stopwatches
- protect_public_state_subtypes
- render_box_intrinsics
Towards https://github.com/flutter/flutter/issues/175276
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
The `flutter_analyzer_plugin` implements rules previously enforced by
the `dev/bots/analyze.dart` check run on the CI, allowing for earlier
detection of custom lint violations before a change is uploaded for
review.
Currently, the plugin implements the following rules:
- avoid_future_catch_error
- no_double_clamp
- no_stopwatches
- protect_public_state_subtypes
- render_box_intrinsics
Towards https://github.com/flutter/flutter/issues/175276
Powered by the new and amazing `unnecessary_ignore` lint.
We're not enabling this lint by default because being able to
temporarily use ignores that don't ignore anything is a powerful tool to
enable migrations. We should turn this lint on locally periodically,
though, and clean up all outdated ignores.
Now that we have a monorepo we can vastly simplify the engine's
`analysis_options.yaml` file: It can just import the general rule set
(instead of recreating it) and then we can apply the engine-specific
rules on top of it. This also makes it easier to tell where the engine
rule set differs from the general one.
No more `# DIFFERENT FROM FLUTTER/FLUTTER` comments. 🥳
Depends on https://github.com/flutter/flutter/pull/161560, which has to
be submitted first.
Adds files from flutter/flaux which contain modifications for the engine
structure. The history for engine/ has been edited. Please see
flutter/engine for the original PRs.
According to the [readme](https://github.com/dart-lang/linter?tab=readme-ov-file#repository-has-moved) of the linter repository, the source of truth for the linter has moved to the SDK repository. This updates the link to `all.yaml` in our file.
While I am in here, I also updated two other links that were outdated.
This primarily implements DecorationImage.lerp().
It also makes some minor tweaks, the main one of which is defering to dart:ui for `clampDouble` instead of duplicating it in package:foundation.
Fixes https://github.com/flutter/flutter/issues/12452
Wildcard parameters and local variables (e.g. underscore-only names like _, __, ___, etc.) will become non-binding in a future version of the Dart language. Any existing code that uses wildcard parameters or variables will break. In anticipation of this change, and to make adoption easier, this lint disallows wildcard and variable parameter uses.
We had no violations of this in the framework. Let's keep it that way!
Syncs our lints with https://github.com/dart-lang/linter/blob/master/example/all.yaml:
* removed the deprecated `iterable_contains_unrelated_type` and `list_remove_unrelated_type` lints (their replacement `collection_methods_unrelated_type` was already enabled for us)
* enabled the new `no_self_assignments` and fixed one issue triggered by the lint.
Sync lints with https://github.com/dart-lang/linter/blob/master/example/all.yaml and enable `implicit_reopen` and `type_literal_in_constant_pattern` (which have no violations). Also contains some clean-up work towards enabling `matching_super_parameters`, which is not quite ready yet due to its handling of "private" arguments.