-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat(neon_framework): use logging framework instead of print #1642
Conversation
I guess we should have a script that checks that print and debugPrint are never used in any of the neon_* packages? |
d3f5b05
to
fdf0847
Compare
Not sure if you already had a look at the latest commit but I've tried to address the suggestion from your other #1642 (comment) I've opted to use the custom_lint package which provides an abstraction to write custom lint rules using the analyzer api (similar to what the analyzer itself uses). I had to bump the project sdk version to 3.2.0 (not the for the packages though) and the analyzer plugin api is still experimental. You can read more about it here https://dart.dev/tools/analysis#plugins. A benefit of this approach is that we can write custom quickFixes for things like |
Yeah I really liked that you added this, it looks like a pretty cool feature to use. I don't like that we have to use a custom script to do the analyzing, but I guess that's a trade off worth it. |
fdf0847
to
8db494c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two things:
- In a lot of places where errors are caught only the info or warning levels are used, but they should be severe instead. I know that some places can stay info or warning, but most should really be severe.
- My IntelliJ doesn't pick up the custom linting rule, do I need to change something so it works? (Yes I restarted the analyzer and the whole IDE).
I don't get any linting in my IDEA (not set up correctly) but in android studio it works. |
This is intentional. We did handle the error in the catch clause so just a warning that a process went wrong. I'd only use severe in the global error handler for uncaught errors. |
I'm not sure what I did before, but now I ran the setup script, restarted IntelliJ and still nothing. |
Can you add this to our docs? I like the graphic as well. |
where would this fit? |
86d495a
to
1c1a656
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just some minor things and you added the requested changes to the wrong commit.
1c1a656
to
f6ef506
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot ❤️
Can you add the simple test for the lint?
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
…tion Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
f6ef506
to
9f5c157
Compare
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
…e_fetching_exceptions Fix/neon_framework/catch_cache_fetching_exceptions
implements: #608