Giter Club home page Giter Club logo

Comments (4)

bartekpacia avatar bartekpacia commented on June 4, 2024

Sounds like a fun task for somebody with some free time :)

I'll write my idea for it:

This tool would accept a lints yaml file, e.g. the one from flutter_lints and print all the rules it contains. If the lints yaml file includes other lints yaml files, rules from them must be recursively added to the result.

So in flutter_lints case:

flutter.yaml -> https://github.com/flutter/packages/blob/main/packages/flutter_lints/lib/flutter.yaml
└── recommended.yaml -> https://github.com/dart-lang/lints/blob/main/lib/recommended.yaml
    └── core.yaml -> https://github.com/dart-lang/lints/blob/main/lib/core.yaml

Maybe there's some existing package that already does this?

I also think it must for sure already exist somewhere in the analyzer internals.

from flutter_corelibrary.

shilangyu avatar shilangyu commented on June 4, 2024

I already started researching this yesterday. Here is the place that implements this logic: https://github.com/dart-lang/sdk/blob/84f528d26dae3c75cad7c850321cbf1a15f96361/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart#L63

Requires extra research how to actually use this outside of analyzer

from flutter_corelibrary.

bartekpacia avatar bartekpacia commented on June 4, 2024

Can a package depend on analyzer just like on any other package?

Depending on stuff from packages's src is bad but there's probably no other option in this case.

from flutter_corelibrary.

shilangyu avatar shilangyu commented on June 4, 2024

Can a package depend on analyzer just like on any other package?

Yes

Depending on stuff from packages's src is bad but there's probably no other option in this case.

Not sure why it isnt re-exported from lib. It seems the dart compiler packages import from src/ all the time for some reason. Looks like even outside packages import src/, like build_runner: https://github.com/dart-lang/build/blob/96e0ba6044a0620b31d99468e19b063367f7f410/build_resolvers/lib/src/resolver.dart#L16

from flutter_corelibrary.

Related Issues (20)

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.