Commit Graph

209 Commits

Author SHA1 Message Date
Michael Goderbauer
c783ce2344
Remove outdated ignores (#162773)
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.
2025-02-06 18:40:25 +00:00
Michael Goderbauer
a328b36f39
Clean up engine's analysis_options.yaml (#161554)
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.
2025-01-15 00:08:24 +00:00
Michael Goderbauer
9cab4ffee1
Use wildcards (#161548)
https://dart.dev/language/pattern-types#wildcard
2025-01-14 05:13:41 +00:00
Michael Goderbauer
7df127b1ee
Enable strict_top_level_inference (#160674)
Only observation: It forces a type on `_` parameters.
2024-12-21 05:23:04 +00:00
John McDole
721b47e7e6 Merge flutter/engine into framework
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.
2024-12-17 14:00:52 -08:00
Michael Goderbauer
775743d49d
Configure Page Width (#159856) 2024-12-06 02:23:23 +00:00
Michael Goderbauer
6494c0b5c4
Update comment in analysis_options.yaml (#159449) 2024-11-25 23:00:03 +00:00
Sam Rawlins
5879a5cba1
Remove unsafe_html lint rule (#157531)
Fixes https://github.com/flutter/flutter/issues/157530
2024-10-28 01:09:20 +00:00
Parker Lougheed
2682633381
Remove non-functional, deprecated package_api_docs lint (#156603)
Reference: https://github.com/dart-lang/linter/issues/5107
2024-10-11 21:17:19 +00:00
Michael Goderbauer
d9dbefc949
fix some unintended HTML tags in docs (#153507)
I used the `unintended_html_in_doc_comment` to find these, but sadly the lint is not ready to be enabled yet due to https://github.com/dart-lang/linter/issues/5065.
2024-08-16 23:17:14 +00:00
Michael Goderbauer
4b60bb530f
Enable invalid_runtime_check_with_js_interop_types, use_truncating_division (#153464)
invalid_runtime_check_with_js_interop_types has been added to recommended: 894b5006c4
2024-08-14 22:10:21 +00:00
Michael Goderbauer
6289944ed6
Lint sync (#153453)
Just syncs our analysis_options.yaml with https://github.com/dart-lang/sdk/blob/main/pkg/linter/example/all.yaml. This is a no-op.
2024-08-14 21:12:15 +00:00
Michael Goderbauer
fd3f769ec5
Update issue link in analysis_options.yaml (#150395) 2024-06-24 18:31:55 +00:00
Kate Lovett
62586dc09d
Update old wiki links (#149544)
Part of https://github.com/flutter/flutter/issues/145009

Finishes updating links in the repo that pointed to the old wiki
2024-06-17 17:26:08 +00:00
Kallen Tu
2c976b48d4
Add missing_code_block_language_in_doc_comment lint. (#145354)
Adds this Dartdoc lint to the flutter repository, in replacement of the
warning it used to have.

Lint Proposal: https://github.com/dart-lang/linter/issues/4904

## Pre-launch Checklist

- [X] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [X] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [X] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [X] I signed the [CLA].
- [X] I listed at least one issue that this PR fixes in the description
above.
- [X] I updated/added relevant documentation (doc comments with `///`).
- [X] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [X] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
[Data Driven Fixes]:
https://github.com/flutter/flutter/wiki/Data-driven-Fixes
2024-04-03 16:00:25 -07:00
Michael Goderbauer
e41881ade2
Sync lints and enable annotate_redeclares (#146144)
Now that extension types are being used in this repository, `annotate_redeclares` seems useful.
2024-04-02 20:01:23 +00:00
Michael Goderbauer
330a2ca2ab
Update links in analysis_options.yaml (#145706)
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.
2024-03-25 21:47:03 +00:00
Matan Lurey
a628814ebd
Allow deprecated members from the Dart SDK and Flutter Engine to roll in (#143347)
Namely, without breaking the tree. This is a deliberate policy decision
change.

See https://github.com/flutter/flutter/issues/143312.
2024-02-13 10:41:46 -08:00
Michael Goderbauer
b0a90aee17
Enable strict-inference (#135043)
Avoids that dynamic accidentally sneaks in, see https://dart.dev/tools/analysis#enabling-additional-type-checks
2023-09-20 19:59:08 +00:00
Michael Goderbauer
382ceb5707
Enable literal_only_boolean_expressions (#133186)
Blocking issue (https://github.com/dart-lang/linter/issues/453) for this lint has been resolved.
2023-08-23 21:35:54 +00:00
Ian Hickson
33e9fd8934
ImageDecoration.lerp (#130533) (#131349)
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

This was first landed in https://github.com/flutter/flutter/pull/130533 and reverted in https://github.com/flutter/flutter/pull/131347.
2023-07-26 23:48:08 +00:00
Ian Hickson
27e912316f
Revert "ImageDecoration.lerp" (#131347)
Reverts flutter/flutter#130533

Tree breakage.
2023-07-26 11:09:59 -07:00
Ian Hickson
bae1ac2f6f
ImageDecoration.lerp (#130533)
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
2023-07-26 17:31:23 +00:00
Michael Goderbauer
55b6f049a6
Enable unreachable_from_main lint - it is stable now!!1 (#129854)
PLUS: clean-up of all the unreachable stuff.
2023-07-06 00:09:01 +00:00
Michael Goderbauer
aa5f4a28e9
Enable no_wildcard_variable_uses lint (#129858)
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!
2023-07-01 01:16:21 +00:00
Parker Lougheed
c65e908449
Update analysis, linter, and repo links in analysis options (#129686)
Contributes to https://github.com/dart-lang/linter/issues/4460 and https://github.com/dart-lang/site-www/issues/4499
2023-06-28 17:30:15 +00:00
Michael Goderbauer
60a87d0798
Sync Lints (#127976)
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.
2023-06-02 04:27:17 +00:00
Michael Goderbauer
5e1ba701ed
enable no_literal_bool_comparisons lint (#126647) 2023-05-16 16:14:23 +00:00
Michael Goderbauer
42d9a2b3fa
Sync lints (#126316)
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.
2023-05-11 13:27:51 +00:00
Michael Goderbauer
f6b9c4da23
Update prefer_final_parameters comment (#125465)
Per discusion in https://github.com/flutter/flutter/pull/125061.
2023-04-26 07:36:19 +00:00
Michael Goderbauer
31798757e7
replace some ._() constructors with class modifiers (#122765) 2023-03-23 12:29:18 -07:00
Michael Goderbauer
fda9ecfef7
Remove 1745 decorative breaks (#123259)
Remove 1745 decorative breaks
2023-03-22 21:12:22 +00:00
Michael Goderbauer
06ed8e65a7
Enable prefer_mixin (#123159)
Enable prefer_mixin
2023-03-21 23:12:26 +00:00
Michael Goderbauer
cf9ba6c341
Enable invalid_case_patterns lint (#122318)
Enable invalid_case_patterns lint
2023-03-09 20:54:41 +00:00
Lioness100
26b6c1bedd
Fix typos (#121171)
* Fix typos

* lowercase animated & opacity

* Undo typo fix

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-23 19:43:21 +00:00
Taha Tesser
a819d61569
Remove prefer_equal_for_default_values lint rule (#120533)
* Remove `prefer_equal_for_default_values` lint rule

* Remove prefer_equal_for_default_values line
2023-02-13 19:47:48 +00:00
Sam Rawlins
e62abfae62
Remove unreachable_from_main linter rule (#120110)
* Remove unreachable_from_main linter rule

* Comment out

* Update analysis_options.yaml

---------

Co-authored-by: Michael Goderbauer <goderbauer@google.com>
2023-02-06 17:52:30 -08:00
Michael Goderbauer
50ed8a34b0
Enable unnecessary_null_comparison check (#118849)
* Enable unnecessary_null_comparison outside of packages

* fix snippet

* enable for all
2023-01-24 21:24:11 +00:00
Michael Goderbauer
b308555ed1
Enable dangling_library_doc_comments and library_annotations lints (#117365) 2022-12-20 16:03:21 -08:00
Michael Goderbauer
fdd2d7d64a
Sync analysis_options.yaml & cleanups (#117327) 2022-12-20 14:15:39 -08:00
Michael Goderbauer
81bc54be75
Enable use_colored_box lint (#117370) 2022-12-20 14:09:55 -08:00
Michael Goderbauer
0220afdd3e
enable use_enums (#117376) 2022-12-20 20:06:24 +00:00
Michael Goderbauer
fa3777bd3e
Enable sized_box_shrink_expand lint (#117371)
* Enable  lint

* note about discarded_futures

* note about use_decorated_box

* update note on require_trailing_commas
2022-12-20 19:07:15 +00:00
Michael Goderbauer
c7eb5b943e
Enable conditional_uri_does_not_exist (#108652) 2022-08-01 22:59:04 +00:00
Michael Goderbauer
2b1288eeed
clean-up analysis_options.yaml (#108747) 2022-08-01 21:54:03 +00:00
Michael Goderbauer
3d1f707317
enable avoid_returning_null (#108650) 2022-07-29 23:41:02 +00:00
Michael Goderbauer
10a7c9ba22
Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00
Alexandre Ardhuin
ccd33631e3
enable combinators_ordering (#107847) 2022-07-18 22:04:07 +00:00
Pierre-Louis
15aa3bfda3
turn on curly_braces_in_flow_control_structures for develop-facing code (#105113) 2022-06-02 11:25:40 +02:00
Michael Goderbauer
cc4cc699f8
Enable use_super_parameters lint (#101074) 2022-04-14 13:26:18 -07:00