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

Add sharezone_lints to notifications package #423

Merged
merged 3 commits into from
Mar 8, 2023

Conversation

nilsreichardt
Copy link
Member

This PR fixes the following warnings:

Analyzing notifications...                                              

   info • Use the generic function type syntax in 'typedef's • lib/src/action_registration.dart:24:24 • prefer_generic_function_type_aliases
   info • The imported package 'meta' isn't a dependency of the importing package • lib/src/instrumentation.dart:9:8 •
          depend_on_referenced_packages
   info • The local variable '_instrumentation' starts with an underscore • lib/src/notification_parser.dart:21:50 •
          no_leading_underscores_for_local_identifiers
   info • The imported package 'collection' isn't a dependency of the importing package • lib/src/push_notification.dart:9:8 •
          depend_on_referenced_packages
   info • Unnecessary 'this.' qualifier • lib/src/push_notification.dart:51:8 • unnecessary_this
   info • The local variable '_other' starts with an underscore • lib/src/push_notification_action_handler.dart:216:43 •
          no_leading_underscores_for_local_identifiers
   info • The local variable '_duplicates' starts with an underscore • lib/src/push_notification_action_handler.dart:223:29 •
          no_leading_underscores_for_local_identifiers
   info • Don't invoke 'print' in production code • test/docs_example_test.dart:24:9 • avoid_print
   info • Use 'const' with the constructor to improve performance • test/docs_example_test.dart:36:7 • prefer_const_constructors

9 issues found. (ran in 1.4s)

Part of #37

@github-actions github-actions bot added dependencies Changing, updating, adding or removing one or more dependencies. testing labels Mar 7, 2023
@github-actions
Copy link

github-actions bot commented Mar 7, 2023

Visit the preview URL for this PR (updated for commit f5977b5):

https://sharezone-test--pr423-add-sharezone-lints-0sjvocg0.web.app

(expires Tue, 14 Mar 2023 21:48:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 4cb3ae61e1e018abfd9841fd3239f5b49ccc034b

Copy link
Collaborator

@Jonas-Sander Jonas-Sander left a comment

Choose a reason for hiding this comment

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

See above

Comment on lines 24 to 28
},
executeActionRequest: (request) {
print(request.stringToPrint);
log(request.stringToPrint);
},
);
Copy link
Collaborator

@Jonas-Sander Jonas-Sander Mar 7, 2023

Choose a reason for hiding this comment

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

Well the thing is this is the code example for the documentation of the PushNotificationActionHandler.
So I guess the example in the doc also needs to be updated, altough I think it would be more confusing to use log instead of print in the example.
So maybe just add ignore_for_file: avoid_print to the top of this file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, makes sense. I added it in 1f6b5c7

@nilsreichardt nilsreichardt merged commit 3dd30be into main Mar 8, 2023
@nilsreichardt nilsreichardt deleted the add-sharezone-lints-to-notifications branch March 8, 2023 08:22
@nilsreichardt nilsreichardt added the refactoring Restructuring and cleaning up existing code without changing its existing behaviour. label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changing, updating, adding or removing one or more dependencies. refactoring Restructuring and cleaning up existing code without changing its existing behaviour. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants