Giter Site home page Giter Site logo

Comments (4)

alankstewart avatar alankstewart commented on July 23, 2024

I agree that filtering is not the responsibility of this library. Will begin making the changes. ArtifactSource already does have a filter method which takes in a DirFilter and FileFilter.

from artifact-source.

johnsonr avatar johnsonr commented on July 23, 2024

Just discussed with Alan. We should add ability to pass two functions to anything that returns an ArtifactSource: One that checks a directory path to see whether it (and its descendants) should be included in the ArtifactSource; and one that checks a file path.

The present filtering mechanism once an ArtifactSource has been constructed should remain unchanged.

Our existing .gitignore support should migrate to the former approach.

from artifact-source.

alankstewart avatar alankstewart commented on July 23, 2024

Callers can send in zero or more filters implementing the ArtifactFilter trait which will apply in order. I have removed JGit from artifact-source and am now using Spring's AntPathMatcher from spring-core. JGit did not filter out the .git directory and so now I created a separate filter called GitDirFilter which can be passed in to the list of filters when creating an ArtifactSource. There is also a GitignoreFileFilter and a AtomistIgnoreFileFilter.

@cdupuis , @kipz I haven't released 0.14.0 of artifact-source yet and I added some sample (commented-out) code to rug-cli which uses the new filters. You can pull artifact-source and use locally. There is no negation of patterns anymore like putting in !node_modules in .atomist/ignore and hoping it will be included if it is specified in .gitignore. These filters work independently so if you want previous behaviour of having to negate !node_modules in .atomist/ignore for example, you will have to write a new filter which handles both ignore files.

from artifact-source.

alankstewart avatar alankstewart commented on July 23, 2024

Sorry, last commits were incorrectly assigned to this issue. Anyhow, this should be complete now

from artifact-source.

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.