You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/22 08:39:22 UTC

[GitHub] [beam] alexeyinkin opened a new pull request, #21981: Upgrade Flutter linter, fix linter issues (#21951)

alexeyinkin opened a new pull request, #21981:
URL: https://github.com/apache/beam/pull/21981

   Resolves #21951 
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
    - [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
   
   To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] asf-ci commented on pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #21981:
URL: https://github.com/apache/beam/pull/21981#issuecomment-1162818221

   Can one of the admins verify this patch?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903457328


##########
playground/frontend/analysis_options.yaml:
##########
@@ -28,7 +28,12 @@ include: package:flutter_lints/flutter.yaml
 
 # exclude generated files
 analyzer:
-  exclude: [lib/api/**, test/**.mocks.dart, lib/**.g.dart, lib/l10n/**.arb, build/**]
+  exclude:
+    - build/**
+    - lib/**.g.dart
+    - lib/api/**
+    - lib/l10n/**.arb

Review Comment:
   I don't believe these are analyzed, but let's keep the behavior for now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903460374


##########
playground/frontend/lib/modules/examples/example_selector.dart:
##########
@@ -153,7 +153,7 @@ class _ExampleSelectorState extends State<ExampleSelector>
                       child: SlideTransition(
                         position: offsetAnimation,
                         child: Material(
-                          elevation: kElevation.toDouble(),
+                          elevation: kElevation,

Review Comment:
   It is already double, linter now flags that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] asf-ci commented on pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #21981:
URL: https://github.com/apache/beam/pull/21981#issuecomment-1162818232

   Can one of the admins verify this patch?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] asf-ci commented on pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #21981:
URL: https://github.com/apache/beam/pull/21981#issuecomment-1162818224

   Can one of the admins verify this patch?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903462923


##########
playground/frontend/pubspec.yaml:
##########
@@ -35,7 +35,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
 version: 1.0.0+1
 
 environment:
-  sdk: ">=2.12.0 <3.0.0"
+  sdk: ">=2.17.0 <3.0.0"

Review Comment:
   We have already upgraded to Flutter 3. It requires Dart 2.17+ so it was used anyway.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903465791


##########
playground/frontend/pubspec.yaml:
##########
@@ -44,37 +44,32 @@ environment:
 # the latest version available on pub.dev. To see which dependencies have newer
 # versions available, run `flutter pub outdated`.
 dependencies:
-  flutter:
-    sdk: flutter
-  provider: ^6.0.0
+  aligned_dialog: ^0.0.6
   code_text_field: ^1.0.0
-  flutter_svg: ^0.22.0
-  url_launcher: ^6.0.12
+  collection: ^1.15.0
   expansion_widget: ^0.0.2
-  grpc: ^3.0.0
-  flutter_web_plugins:
+  flutter:
     sdk: flutter
   flutter_localizations:
     sdk: flutter
+  flutter_svg: ^0.22.0
+  flutter_web_plugins:
+    sdk: flutter
+  google_fonts: ^2.3.1
+  grpc: ^3.0.0
+  highlight: ^0.7.0
   intl: ^0.17.0
-  aligned_dialog: ^0.0.6
+  provider: ^6.0.0
   shared_preferences: ^2.0.12
+  url_launcher: ^6.0.12
+  usage: ^4.0.2
 
 dev_dependencies:
+  build_runner: ^2.1.4
+  flutter_lints: ^2.0.1
   flutter_test:
     sdk: flutter
   mockito: ^5.0.16
-  build_runner: ^2.1.4
-  google_fonts: ^2.3.1
-  usage: ^4.0.2
-  collection: ^1.15.0

Review Comment:
   These three are normal dependencies and not dev-time ones.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] asf-ci commented on pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #21981:
URL: https://github.com/apache/beam/pull/21981#issuecomment-1162818223

   Can one of the admins verify this patch?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] asf-ci commented on pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
asf-ci commented on PR #21981:
URL: https://github.com/apache/beam/pull/21981#issuecomment-1162818228

   Can one of the admins verify this patch?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903461665


##########
playground/frontend/lib/pages/playground/states/examples_state.dart:
##########
@@ -50,31 +50,31 @@ class ExampleState with ChangeNotifier {
   }
 
   Future<String> getExampleOutput(String id, SDK sdk) async {
-    return await _exampleRepository.getExampleOutput(
+    return _exampleRepository.getExampleOutput(

Review Comment:
   Returning the future is the same as awaiting and then returning. Linter now flags this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903456803


##########
playground/frontend/analysis_options.yaml:
##########
@@ -28,7 +28,12 @@ include: package:flutter_lints/flutter.yaml
 
 # exclude generated files
 analyzer:
-  exclude: [lib/api/**, test/**.mocks.dart, lib/**.g.dart, lib/l10n/**.arb, build/**]

Review Comment:
   So we can easily edit the lines individually.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pabloem commented on pull request #21981: [Playground] Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
pabloem commented on PR #21981:
URL: https://github.com/apache/beam/pull/21981#issuecomment-1163373877

   lgtm thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] pabloem merged pull request #21981: [Playground] Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
pabloem merged PR #21981:
URL: https://github.com/apache/beam/pull/21981


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903459702


##########
playground/frontend/lib/modules/examples/components/example_list/category_expansion_panel.dart:
##########
@@ -54,8 +54,8 @@ class CategoryExpansionPanel extends StatelessWidget {
             children: [
               Transform.rotate(
                 angle: -math.pi * animationValue,
-                child: const Icon(Icons.keyboard_arrow_down),

Review Comment:
   Linter now recommends to order 'child' property last as it tends to be the largest one.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903463940


##########
playground/frontend/pubspec.yaml:
##########
@@ -44,37 +44,32 @@ environment:
 # the latest version available on pub.dev. To see which dependencies have newer
 # versions available, run `flutter pub outdated`.
 dependencies:

Review Comment:
   Linter requires alphabetic ordering of dependencies.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on PR #21981:
URL: https://github.com/apache/beam/pull/21981#issuecomment-1162836788

   R: @damondouglas 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] alexeyinkin commented on a diff in pull request #21981: Upgrade Flutter linter, fix linter issues (#21951)

Posted by GitBox <gi...@apache.org>.
alexeyinkin commented on code in PR #21981:
URL: https://github.com/apache/beam/pull/21981#discussion_r903458384


##########
playground/frontend/lib/components/dropdown_button/dropdown_button.dart:
##########
@@ -41,7 +41,7 @@ class AppDropdownButton extends StatefulWidget {
   }) : super(key: key);
 
   @override
-  _AppDropdownButtonState createState() => _AppDropdownButtonState();

Review Comment:
   Exposing a private class in public API.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org