-
Notifications
You must be signed in to change notification settings - Fork 58
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
Fix puspec.yaml path when analysis_option.yaml is not at root #19
Conversation
return pubspecFile; | ||
} | ||
|
||
final pathComponents = p.split(packagePath); |
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.
Instead of path manipulation, we can use File/Directory.parent
Hello! This needs some test. Fancy doing it? |
Hello! Do you still plan on working on this? |
Hey! Oh, I see that now tests are working on |
Hello! The proposed changes don't work with the latest version. After making the changes in both I had problems with tests as I'm closing the PR since it's outdated. I hope to revisit this issue later. Thanks again for the plugin! |
* disable deprecated rule * update changelog, version, description
Thanks for this package! It makes the process of creating custom rules sooo much simpler, I love it! 💙
The package, though, does not work for cases when
analysis_options.yaml
is placed not near thepubspec.yaml
file. This is the case for packages with custom linter settings whereanalysis_options
is located somewhere insidelib
folder. With this PR, I propose to introduce additional logic - whenpubspec
is not found, we may iterate through path components and try to findpubspec
- it must be somewhere, right?I've checked the package locally with the proposed changes, and it seems to work. Unfortunately, I was not able to write tests for these changes because almost all tests from the
main
branch are failing for me withIs there a missing package?
Anyway, happy to add tests if you agree that this functionality is useful.