GithubHelp home page GithubHelp logo

Ignore sub-packages about dependency_validator HOT 3 OPEN

workiva avatar workiva commented on June 4, 2024
Ignore sub-packages

from dependency_validator.

Comments (3)

evanweible-wf avatar evanweible-wf commented on June 4, 2024

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.

fzyzcjy avatar fzyzcjy commented on June 4, 2024

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.

DanielSmith1239 avatar DanielSmith1239 commented on June 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.