Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No fluent setter for usingDefaultExcludes in AbstractFileSet #311

Closed
redzi opened this issue Nov 21, 2023 · 1 comment
Closed

No fluent setter for usingDefaultExcludes in AbstractFileSet #311

redzi opened this issue Nov 21, 2023 · 1 comment

Comments

@redzi
Copy link
Contributor

redzi commented Nov 21, 2023

This is not an issue but a proposal for a very minor change that would make the creation of FileSets easier.
There is no fluent way of setting the usingDefaultExcludes flag in AbstractFileSet.

Due to this inconvenience instead of a completely fluent way of creating a FileSet instance:

fileSet(new File("foo"))
          .prefixed("pfx")
          .include(includes)
          .exclude(exc)
          .usingDefaultExcludes(usingDefaultExcludes);

one needs to do it like this:

DefaultFileSet fileSet = fileSet(new File("foo"))
          .prefixed("pfx")
          .include(includes)
          .exclude(exc);

fileSet.setUsingDefaultExcludes(false);

The fileSet variable needs to be of type DefaultFileSet because the FileSet interface does not provide the setter.

@redzi
Copy link
Contributor Author

redzi commented Nov 21, 2023

PR with the addition of the fluent setter: #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants