-
Notifications
You must be signed in to change notification settings - Fork 73
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
Custom lints for several projects inside one repo #204
Comments
somtimes, also this appears:
|
Yes, please, share a reproducible sample. Make a github repository that I can use somewhere. Otherwise I'll have a hard time fixing this. |
I also have the same problem and I am able to reproduce it. Given the following project structure:
Then adding the I hope that helps! |
Thanks for your input on this topic. My setup is even simpler than yours, and the import of the custom_lint works.
All good, but in the moment I include the sub_custom_analyzer in the sub_package_1 or sub_package_2 pubspec.yaml files, similar to how I do it in the main_flutter_project, it crashes. So the problem is not with the import of the custom_lint but with the import of my sub_custom_analyzer. Maybe I did messed up sth. with my setup. |
Are there any solutions to this problem? |
This issue should've been closed when the PR was merged recently. Closing |
@kensamare Use the latest custom_lint version and you should be good |
@rrousselGit Latest version does work in VS Code and Cli, but somehow I get the same error when using Android Studio |
Describe the bug
Hello, I followed your readme and created a custom lint package (lets name it CL). I added it (same as the custom_lint package to the pubspec.yaml of my project A) and everything works as expected. The custom rule findings are shown in the dart analyse section of my IDE. But the repository/ project setup is a little bit more complex. Here is the summarised folder structure:
I have a, lets say, main flutter project A, which is importing another sub-project (SP) within the same repo via:
The problem now is, that the custom lint rules are not applied to the code inside SP (even though the analysis_options file is setup correctly and it works for A). I thought, that I maybe have to add the CL reference (and custom_lint) to the pubspec.yaml of SP (similar how I did it for A). When doing this, following is the output of the custom_lint.log:
When I add CL just to SP (not to both):
The findings from the custom lint rules are just shown for the SP but not for A. Somehow there is a problem when applying CL for both projects. Do you have any idea?
To Reproduce
Is it needed/ doable for this complex setup?
Expected behavior
Custom lint rule findings in project A and SP are shown in the analyze error section of my IDE.
Thank you in advance!
The text was updated successfully, but these errors were encountered: