Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[all] Switch to pedantic analysis rules #2300

Merged
merged 2 commits into from
Nov 25, 2019
Merged

[all] Switch to pedantic analysis rules #2300

merged 2 commits into from
Nov 25, 2019

Conversation

mklim
Copy link
Contributor

@mklim mklim commented Nov 23, 2019

Description

Switches our out of date fork of Flutter's analysis rules to the
pedantic package. In order to make this an easy change to initially land
and then incrementally enable, any existing non-trivial lints have just
been ignored within their respective packages instead of being fixed.

Also adds a global lint for missing public DartDocs. Like the pedantic
lints, this is ignored in packages that are already failing it.

Related Issues

flutter/flutter#45440

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

Switches our out of date fork of Flutter's analysis rules to the
pedantic package. In order to make this an easy change to initially land
and then incrementally enable, any existing non-trivial lints have just
been ignored within their respective packages instead of being fixed.

Also adds a global lint for missing public DartDocs. Like the pedantic
lints, this being ignored in packages that are already failing it.
Comment on lines +5 to +9
// This is a temporary ignore to allow us to land a new set of linter rules in a
// series of manageable patches instead of one gigantic PR. It disables some of
// the new lints that are already failing on this plugin, for this plugin. It
// should be deleted and the failing lints addressed as soon as possible.
// ignore_for_file: public_member_api_docs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I tried putting in an analysis_options.yaml for this plugin like everywhere else, but for some reason this particular plugin was having issues importing the pedantic package transitively when running pub global tuneup. No idea why as the package was showing as included in the pubspec.lock and nothing looked different from any of the other packages. Seems like some kind of bug to me in pub or the linter to me. I'm just working around it by putting the ignores in the source code directly instead. It's not ideal, but it shouldn't matter since in the long term this should be fixed anyway.

@@ -10,6 +10,6 @@ Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();
final String result =
await driver.requestData(null, timeout: const Duration(minutes: 1));
driver.close();
await driver.close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this is a good catch.

@mklim mklim merged commit f31b997 into flutter:master Nov 25, 2019
@mklim mklim deleted the pedantic_gradual_migration branch November 25, 2019 22:17
sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
Switches our out of date fork of Flutter's analysis rules to the
pedantic package. In order to make this an easy change to initially land
and then incrementally enable, any existing non-trivial lints have just
been ignored within their respective packages instead of being fixed.

Also adds a global lint for missing public DartDocs. Like the pedantic
lints, this is ignored in packages that are already failing it.
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
Switches our out of date fork of Flutter's analysis rules to the
pedantic package. In order to make this an easy change to initially land
and then incrementally enable, any existing failures have just been
ignored within their respective packages instead of being fixed.

Also adds a global lint for missing public DartDocs. Like the pedantic
lints, this is ignored in packages that are already failing it.

This is a mirror of a similar change to flutter/plugins, flutter#2300.
Akachu pushed a commit to Akachu/flutter_camera that referenced this pull request Apr 27, 2020
Switches our out of date fork of Flutter's analysis rules to the
pedantic package. In order to make this an easy change to initially land
and then incrementally enable, any existing non-trivial lints have just
been ignored within their respective packages instead of being fixed.

Also adds a global lint for missing public DartDocs. Like the pedantic
lints, this is ignored in packages that are already failing it.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants