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

Allow to provide a custom rank function #28

Open
Grohden opened this issue Mar 28, 2018 · 0 comments
Open

Allow to provide a custom rank function #28

Grohden opened this issue Mar 28, 2018 · 0 comments

Comments

@Grohden
Copy link

Grohden commented Mar 28, 2018

The actual rank function isn't working for me.

We map every glob to a absolute path (this is an internal need ), and that makes the rank matcher not match on the rank function.

Say we have the following patterns:

[
"C:\folder\src\app\modules\analytics\**\*.config.js"
"C:\folder\src\app\modules\analytics\**\*.run.js"
"C:\folder\src\app\modules\analytics\**\*.filter.js"
"C:\folder\src\app\modules\analytics\**\*.controller.js"
"C:\folder\src\app\modules\analytics\**\*.directive.js"
"C:\folder\src\app\modules\analytics\**\*.service.js"
"C:\folder\src\app\modules\analytics\**\*.model.js"
"C:\folder\src\app\modules\analytics\**\*.factory.js"
]

With that, the rank function fails at the matcher.match(s),
for example, with an given s = "test.config.js" the matcher of the first item of the array will not match (at least it's not matching for me).

I don't know if it's a bug with minimatch or a real bug, but allowing to provide a custom rank function would solve this problem for me.

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

1 participant