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

feat: make nyc instrument more clever about file extension #573

Open
bcoe opened this issue May 15, 2017 · 3 comments
Open

feat: make nyc instrument more clever about file extension #573

bcoe opened this issue May 15, 2017 · 3 comments

Comments

@bcoe
Copy link
Member

bcoe commented May 15, 2017

it would be great if nyc instrument could accept a file extension when instrumenting files in a directory, alternatively when given a directory as input, perhaps we should just be applying nyc's include/exclude rules?

This feature grows out of errors that can occur if a user attempts to instrument an entire directory which contains files other than JS.

@JaKXz
Copy link
Member

JaKXz commented Jan 28, 2019

@AndrewFinlay Is this also covered in #893 or #977?

@AndrewFinlay
Copy link
Contributor

I think you should be able to do this using glob patterns, which would be covered by #893. Using an include of **/*.js should do this for you, when it's all finished of course. #977 is more of a bug fix for the current --all command, where changes to the glob module removed support for !**/exclude.negated, so any exclude negated instrumentation candidates are being filtered out before they go through a second candidacy test in test-exclude.

@coreyfarrell
Copy link
Member

I think we should use the extension array for this (so adding that option to the nyc instrument command).

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

No branches or pull requests

4 participants