Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated package:pedantic with package:flutter_lints and update analysis_options.yaml #170

Merged
merged 17 commits into from Sep 21, 2021

Conversation

ben-xD
Copy link
Contributor

@ben-xD ben-xD commented Sep 15, 2021

I removed deprecated pedantic package, added new flutter_lints package, and simplified analysis_options.yaml to be more maintainable and readable.

Closes #168
Also, closes #85


After doing the dependency changes, I checked which rules are already being added "included" by using the new lint package, include: package:flutter_lints/flutter.yaml, and removed the lint rules which are already enabled by default. This reduces the content of analysis_options.yaml without changing any dart analysis warnings. This a combination of 3 files, flutter, recommended and core:

This existing shopping-list/ kitchen-sink style of analysis_options.dart is common when a lint package is not used/ include'd. However, when we do use a convenient package like flutter-lints, it doesn't make sense to override them to be the same values.

From this, I realised that the annoying issue I've been facing over the past 2 months leading to inconsistent styling in the code is down to this a lint rule that was turned on: #169, so I created that issue. To avoid noise in this PR, that will be a separate PR in the future.


I also had to format test/rest/channels_test.dart. It seems like the Dart analyzer was not linting/ checking formatting in that file previously.

@ben-xD ben-xD changed the title Use [flutter_lints]() and reformat Use [flutter_lints](https://pub.dev/packages/flutter_lints) and reformat Sep 15, 2021
@ben-xD ben-xD changed the title Use [flutter_lints](https://pub.dev/packages/flutter_lints) and reformat Replace deprecated package:pedantic with package:flutter_lints and update analysis_options.yaml Sep 15, 2021
@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 15, 2021 06:54 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 15, 2021 07:01 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 15, 2021 07:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 15, 2021 07:22 Inactive
Copy link
Contributor

@tiholic tiholic left a comment

Choose a reason for hiding this comment

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

LGTM

Required once we switch our GitHub org default from 'permissive' to 'restricted'.
Copy link
Contributor

@QuintinWillison QuintinWillison left a comment

Choose a reason for hiding this comment

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

It would be impractical for me to comb this line by line. I trust that you've made the right choices. Thanks for updating this. 🚀

@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 20, 2021 09:18 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 20, 2021 09:28 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 20, 2021 10:52 Inactive
Explicitly specify workflow `permissions` required to succeed when our org switches default access from 'permissive' to 'restricted'
@github-actions github-actions bot temporarily deployed to staging/pull/170/dartdoc September 20, 2021 12:33 Inactive
@ben-xD ben-xD merged commit 3062cfe into main Sep 21, 2021
@ben-xD ben-xD deleted the feature/use-flutter-lints-and-reformat branch September 21, 2021 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Replace package:pedantic with package:flutter_lints Lint rule to enforce strict raw types
3 participants