Comments (3)
Personally, I like this idea since we also commonly use nested packages and have to ignore them like so:
# pubspec.yaml
dependency_validator:
exclude:
- app/**
My only concern is that this would be inconsistent with how the Dart analyzer works. Right now, if you have a directory structure like the one you outlined, running the analyzer from the root mypackage
will also analyze the example
subpackage. You have to specify an exclude in analysis_options.yaml
to avoid that. In other words, it doesn't really seem like there's precedent for Dart tooling being aware of subpackages and handling them differently than any other subdirectory.
Given that and the fact that this would be a behavioral change that consumers might be relying on, I'm hesitant to introduce this (at least in a minor release). Using the exclude
option is at least an easy way to accomplish the same thing. What do you think?
from dependency_validator.
My only concern is that this would be inconsistent with how the Dart analyzer works. Right now, if you have a directory structure like the one you outlined, running the analyzer from the root mypackage will also analyze the example subpackage. You have to specify an exclude in analysis_options.yaml to avoid that. In other words, it doesn't really seem like there's precedent for Dart tooling being aware of subpackages and handling them differently than any other subdirectory.
The problem is, a dependency in subpackage should not be added to the parent's yaml! So it is indeed a bug.
from dependency_validator.
Hello, would you be able to potentially add an option to easily toggle on/off sub packages without having to explicitly set to exclude each package?
from dependency_validator.
Related Issues (19)
- UIP-3198 Add --help flag HOT 1
- UIP-3199 Document --no-fatal-dev-missing flag
- UIP-3197 Ignore imports in strings HOT 7
- UIP-3196 Transformers should be in dependencies, not dev_dependencies HOT 1
- FlutterSDK unavailable HOT 2
- Dependencies can be more than imports or used binaries HOT 2
- zsh: command not found: dependency_validator
- [Request] Possible to user a specific comment to exclude certain packages? HOT 1
- Consider implementing this as an analyzer plugin
- Can't find path to build config on Windows, version 2.0.0 HOT 4
- Null-safety HOT 2
- CI/CD HOT 3
- How to fix "The following packages contain executables" for flutter_native_splash HOT 2
- Add --exclude-dir option to allow excluding certain directories HOT 1
- config // allow pinned dependencies
- Auto-fix for errors?
- Analyze analysis_options.yaml as dependency HOT 2
- Not properly ignoring "missing packages" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dependency_validator.