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

Analysis doesn't seem to respect ignore comments #6993

Closed
liamappelbe opened this issue Sep 1, 2023 · 6 comments
Closed

Analysis doesn't seem to respect ignore comments #6993

liamappelbe opened this issue Sep 1, 2023 · 6 comments

Comments

@liamappelbe
Copy link

cupertino_http uses a lot of generated code, which has quite a lot of unused fields. It's not practical to remove those unused fields, so there's a // ignore_for_file: unused_field comment at the top of the file.

If I run flutter analyze locally, the analysis passes. But on pub.dev it fails due to the unused fields: https://pub.dev/packages/cupertino_http/score

image

So pub.dev seems to be ignoring the ignores. Is this intended?

@quetool
Copy link

quetool commented Mar 11, 2024

Same is happening for *.freezed.dart files which uses ignore_for_file: type=lint

Screenshot 2024-03-11 at 12 09 24

Screenshot 2024-03-11 at 12 09 18

@isoos
Copy link
Collaborator

isoos commented Mar 11, 2024

@quetool: can you post the package name, and also your local Dart SDK version?

@quetool
Copy link

quetool commented Mar 11, 2024

Thanks for the reply, @isoos !
Dart version 3.2.0
Package https://pub.dev/packages/web3modal_flutter/versions/3.1.2

It started happening a couple of releases ago...

@isoos
Copy link
Collaborator

isoos commented Mar 11, 2024

I think the issue is that your are lint-level issues with ignore_for_file: type=lint, but the == operator should be non-nullable seems to be warning-level, and the lint rule is not applied to it. Are you on the latest freezed? it seems that they have some related change a few months back.

@quetool
Copy link

quetool commented Mar 11, 2024

You are right @isoos , they have fixed it on 2.4.6, I have 2.4.5.
Thanks and sorry for the ping!

@liamappelbe
Copy link
Author

This seems to be fixed now. The remaining analysis issue on the score page is to do with formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants