-
Notifications
You must be signed in to change notification settings - Fork 1
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
[CY-6067] Reporting false positive issues in Flutter project #13
Comments
Internal ticket created : CY-6067 |
Hi there, Thanks for reaching out to our community! I am proposing your case to the Engineering Team and return as soon as I have an update. Best, |
Hi @zeshuaro |
Thanks for explaining this. With regard to this:
Is there a way to make Codacy to run a full analysis of the repository? If not, I would imagine that it would keep reporting issues in each PR as some files might be missing in the PR. |
When you add the repository for the first time this full analysis should occur. Since there was a bug with the tool that analysis might have failed. |
I'm seeing similar issues in my project. It seems to be caused by running the analyzer without installing package dependencies or the flutter framework.
I don't think this is possible using dart analyser. You must analyse the entire project at once. Some examples:
These are all false positives, and there are hundreds more.
I also run the analyser in GitHub Actions, and no issues are reported there: https://github.com/ShrapnelDSP/ShrapnelMonorepo/actions/runs/3068683044/jobs/4956442251 Unfortunately, these problems make the dart analyzer in codacy useless for Flutter projects. |
Any update on this ?! |
I'm facing this issue as well, with errors such as Undefined class 'Widget' (while obviously the file imports material.dart). |
Apologies if I'm not supposed to raise/report issues related to
dartanalyzer
on my project here, I was searching through Codacy support then I realised the existence of this repository. I figured it might be easier to raise the issue here.This is the Flutter project that I'm trying to use Codacy analysis: https://github.com/zeshuaro/appainter. I enabled the
dartanalyzer
for this project, but it's reporting a bunch of issues which I'm not seeing locally (see the list of Codacy issues here). It's also weird that there's only 2 particular files that it's reporting the issues:lib/input_decoration_theme/widgets/border_side_fields.dart
test/basic_theme/basic_theme_cubit_test.dart
I've tried running
dartanalyzer
locally throughdartanalyzer lib/
anddartanalyzer test/
, but I didn't see any of the issues reported by Codacy. This is the version I have fordartanalyzer
:Anyway, I think this might be related where the project also uses code generation. I need to run the following command to generate all the files used in the project (it's a Flutter project, so I generally use the
flutter
CLI, but I think thedart
CLI should work the same):Would someone be able to help look into it? If this is not the right channel, happy to raise the issue elsewhere.
The text was updated successfully, but these errors were encountered: