Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Conversation

@pbrisbin
Copy link
Contributor

The existing algorithm was hard to follow and prone to expanding large
directories that should be completely ignored. The new algorithm is the simpler
one used by most engines.

The only difference in this engine is that we also do glob-filtering on a
per-language basis. This used to be configurable, but that fact was not
advertised and is likely not being used. The constant was renamed accordingly.

This should fix #106

/cc @codeclimate/review

The existing algorithm was hard to follow and prone to expanding large
directories that should be completely ignored. The new algorithm is the
simpler one used by most engines.

The only difference in this engine is that we also do glob-filtering on
a per-language basis. This used to be configurable, but that fact was
not advertised and is likely not being used. The constant was renamed
accordingly.

This should fix #106
@ABaldwinHunter
Copy link
Contributor

LGTM

@pbrisbin
Copy link
Contributor Author

FYI: I'm seeing a difference in issues found between this and the old image, so I'm looking into that before merging.

The include_paths may or may not be ./-prefixed (they usually aren't,
but there's the notable case of ["./"]). Patterns are never ./-prefixed
(they can't be for the purposes of relative expansion). Given this
uncertainty, it's possible to drop files if you're not careful in how
you match or expand. In addition to this, fingerprints in the wild are
all computed with ./-prefixed paths. For all these reasons, we need to
normalize the prefixing of paths and patterns in FileList.
@pbrisbin
Copy link
Contributor Author

Fixed with the addition of #relativize. Confirmed that it produces the same results as the existing engine on all CC repos I have on my local system. Will merge on Green.

pbrisbin added a commit that referenced this pull request Mar 22, 2016
@pbrisbin pbrisbin merged commit 72c3a8b into master Mar 22, 2016
@pbrisbin pbrisbin deleted the pb-include-paths branch March 22, 2016 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not respecting exclude_paths?

3 participants