27 Commits

Author SHA1 Message Date
79f8b0b665 [various] Add missing_code_block_language_in_doc_comment lint to flutter/packages. (#6473)
Adds this Dartdoc-related lint to the flutter repository, in replacement
of the Dartdoc warning (missingCodeBlockLanguage) because it will be
deprecated and removed soon.

flutter/flutter already has this lint as well. Adding to flutter/engine
with https://github.com/flutter/engine/pull/51944.

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

Issue covering future work removing the `// ignore:`s:
https://github.com/flutter/flutter/issues/157620

## 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 [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [x] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style].
- [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] 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/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[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
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
2024-11-04 14:24:38 -08:00
e12e073a01 Disable two lint rules which are being removed. (#7959)
Each of these are going to be removed soon.

* avoid_null_checks_in_equality_operators
* unsafe_html

Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
2024-10-30 02:29:15 +00:00
bf751e6dff Disable non-functional, deprecated package_api_docs lint (#7858)
Reference: https://github.com/dart-lang/linter/issues/5107
2024-10-14 18:47:10 +00:00
5cc71d00ac Update Flutter wiki links (#6789)
Updates all links to the Flutter wiki to point to their new location in the flutter/flutter repository. (The sole exception is a link to a doc that doesn't have a final home yet, and is linked from legacy code anyway so doesn't really need to be updated.)

While touching the PR template, makes a few minor improvements:
- Removes the breaking change discussion that doesn't apply to this repository, as breaking changes are handled totally differently for packages (and is covered by the link to docs about Dart versioning).
- Adds text and a link to reflect the fact that some PRs can be changelog-exempt.
2024-05-26 12:47:23 +00:00
a864254473 Allow deprecated members from the Dart SDK/Flutter Framework to roll in (#6111)
Namely, without breaking the tree. This is a deliberate policy decision change.

See https://github.com/flutter/flutter/issues/143312.
2024-02-14 12:19:26 +00:00
09205ca19b Re-land: Enable prefer_mixin and bump plugin_platform_interface to 2.1.7 (#5841)
This reverts commit 5aef49b1c1, except for the Flutter version pin, thus re-landing https://github.com/flutter/packages/pull/5793. Now that the tree is fixed, it can be re-landed for auto-publishing.
2024-01-09 01:15:14 +00:00
5aef49b1c1 [ci] Revert #5793 + Manual flutter roll to c6ddb73f971edd8210893db9f26ae665906cd6be (#5812)
This PR reverts #5793 and rolls flutter `master` version to the latest
`d97fafa6f`.

#5793 should be re-landed on top of the newest master, so all the
packages it touches can be published automatically.

## 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 [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [ ] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style].
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] 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/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[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
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#version-and-changelog-updates
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/wiki/Contributing-to-Plugins-and-Packages#changelog-style
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests

---------

Co-authored-by: Tarrin Neal <tarrinneal@gmail.com>
2024-01-06 00:56:29 -08:00
24a12a4a18 Enable prefer_mixin and bump plugin_platform_interface to 2.1.7 (#5793)
Follow-up to
https://github.com/flutter/packages/pull/5717#discussion_r1440717046.

---------

Co-authored-by: Tarrin Neal <tarrinneal@gmail.com>
2024-01-05 11:14:32 -08:00
bb97da8ec6 [various] Sync lints with flutter/flutter (#5717)
Applying the latest analysis_options.yaml from flutter/flutter to this
repo. Most fixes were auto-generated by `dart fix`.
2024-01-03 15:16:49 -08:00
06cd9e967b Replace collection type lints with more general lint (#4912)
See https://dart.dev/tools/linter-rules/collection_methods_unrelated_type
2023-09-13 00:37:24 +00:00
97e3ba64d7 [various] Fixes unawaited_futures violations (#4067)
This option had been disabled to match flutter/flutter, but the reason it was disabled there was "too many false positives", mostly around animation. That doesn't apply to most packages here, and we've had a number of production bugs—especially in plugins, that use async heavily in ways that are intended to be client-awaitable—that this would have caught.

This PR:
- Enables the option at the repo level.
- Permanently (unless the owners decide to change it) opts out `animations` and `go_router`, both of which looked like mostly or entirely false positives.
- Temporarily opted out a few plugins that have a lot of violations that should be handled in their own PRs later (`camera_android_camerax`, most of `webview_flutter`).
- Fixes all remaining violations.

In many cases this PR is behavior-changing, replacing implicitly unawaited futures that did not seem obviously intentional with `await`ed futures, so non-test code in particular should be reviewed carefully to make sure the changes are correct. All of the changes are manual, not `fix`-generated.

Part of https://github.com/flutter/flutter/issues/127323
2023-05-24 15:39:26 +00:00
d449a17f87 [various] Remove unnecessary null checks (#4060)
Removes `unnecessary_null_comparison: ignore` from the repository analysis options. Now that Dart 3 has reached the stable channel, all fully supported customers will be running in strong mode, so the extra null checks are no longer needed. While many packages do support earlier versions, this won't break anyone, it will just mean that people who are both a) using old versions of Flutter and b) violating the API contract by passing null to a non-nullable type, won't get error messages that are as obvious, which is fine for the best-effort support level we give to pre-current-stable versions of Flutter.
2023-05-22 20:10:40 +00:00
2e4224e450 [ci] Enable no_runtimeType_toString (#3129)
Enables the `no_runtimeType_toString` analysis option. This isn't part
of the base flutter/flutter analysis options, but is set in
flutter/packages which this repo better corresponds to.

This is already enabled in flutter/plugins, and is being enabled here as
part of aligning their options.

Part of https://github.com/flutter/flutter/issues/113764
2023-02-01 00:17:56 +00:00
2d48415fe8 [ci] Add .g.dart to analysis ignore list (#3130)
In preparation for merging repos, this adds the `.g.dart` suffix we use
for Pigeon-generated files in plugins to the analysis ignore list. This
eliminates the last remaining difference between the two repos' analysis
options.

Part of https://github.com/flutter/flutter/issues/113764
2023-01-31 23:25:20 +00:00
ab6268907d [ci] Enable strict-casts (#3127)
* Enable strict-casts and fix violations

* Bump versions

* Fix Pigeon version bump
2023-01-31 20:11:36 +00:00
4f34e50818 [ci] Cirrus pre-alignment with flutter/plugins, part 1 (#2706) 2022-10-19 17:55:16 +00:00
88585ef988 [analysis_options] sync lint rules with flutter/flutter (#2495) 2022-08-25 16:57:05 +00:00
4eda7ad208 [pigeon] Fixes bug where Dart FlutterApis would assert that a nullable argument was nonnull (#1515) 2022-04-14 07:19:47 -07:00
9fadcec5de Enable pubspec checks (#367) 2021-06-02 14:04:05 -07:00
a164beb7bf Sync lints and fix offenders (#308) 2021-03-11 13:40:43 -08:00
93ae0899bb Actually call argument-less methods. (#265)
I accidentally broke this in an earlier patch.
2021-02-03 10:44:19 -08:00
ca4992ecd0 Import metrics_center (#268) 2021-01-22 16:19:34 -08:00
446e7a82f0 Require docs on public API (#51) 2019-12-05 09:23:02 -08:00
053ed44806 Sync analysis options (#29) 2019-08-28 10:52:29 -07:00
14ff267dc5 enable lints unnecessary_new and unnecessary_const (#4) 2018-10-05 22:52:16 +02:00
542149a5a0 Update README.md 2018-06-18 17:22:47 -07:00
70de3f6b12 Setup packages repo for CI, update analysis options 2018-06-15 12:07:14 -07:00