Git Product home page Git Product logo

Comments (2)

datur avatar datur commented on July 19, 2024 1

It would also be really cool if the linter could skip over a file if there are no rules enable for a given file. Currently it seems all files are visited regardless of if a rule is enabled or not!

from fixit.

amyreese avatar amyreese commented on July 19, 2024

As a CLI flag, this is simple: we can pass an exclude kwarg to trailrunner.walk(...) to apply excludes when walking. This would be a relatively straightforward PR adding an appropriate exclude_paths value to the Options dataclass and then passing that to trailrunner.

Providing this from a config file will be a bit more tricky, since we would need to materialize configs for each candidate path before we can exclude them, and that normally only happens in fixit_file after we already have spawned child processes. It might be useful instead to move towards materializing configs in fixit_paths based on the parent directory, use that when walking to exclude paths, and then pass those configs through to fixit_file.

This would also have the benefit of frontloading disk access, allow more caching of config objects, and give us access to the materialized set of lint rules for each file in the main process, which would enable work for #321 to preform warmup before spawning child processes.

from fixit.

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.