Ignore nested packages in surrounding package (#173) - #183
Draft
mosuem wants to merge 1 commit into
Draft
Conversation
Author
|
@matthewnitschke-wk it seems this repo is a bit stale - are you still working on it? Or should we rather fork to implement fixes? Just curious! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI-generated -- I will take a look at this myself first, don't read yet :)
Motivation
Fixes #173.
Dependency validator previously scanned all files outside
lib/andbin/recursively and attributed all Dart/SCSS/Less dependencies to the surrounding package. When a package contains nested packages (e.g.example/host_name/with its ownpubspec.yaml), code in the nested package was incorrectly analyzed as part of the surrounding package, causing false-positive missingdev_dependencieswarnings for packages only used within the nested package.Changes
listNestedPackageshelper to discover all nested package directories (subdirectories containingpubspec.yaml, excluding the root package and hidden directories like.dart_tool/).unusedDependencieshandling so analyzer warning is checked before removing ignored packages.executable_test.dartfor modern analyzer compatibility.test/utils_test.dartandtest/nested_packages_test.dart.Testing/QA Instructions
Automated tests have been added covering nested package handling and
listNestedPackages.All unit and integration tests pass via
dart test.