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

Ignored files are accounted for in processing list and result in non-zero exit code #48

Closed
JeffersonBledsoe opened this issue Oct 7, 2020 · 2 comments
Labels
🙋 no/question This does not need any changes

Comments

@JeffersonBledsoe
Copy link

Subject of the issue

Files that are in the ignore list are still added to the list of files to process. This makes it difficult to easily run the engine against a large directory (e.g. one that contains node_modules) using a **/** glob as it will find the argument list is too long. Additionally, it makes it more difficult to use within CI, as trying to process and ignored file results in an error being produced rather than silently skipping over files the user has already marked as not wanting to be accounted for.

Steps to reproduce

  1. Add a file name to the ignoreName list when calling engine

Expected behaviour

The engine silently ignored the file, acting as if the file doesn't exist and not attempting to process it. The engine would producing a 'no files were found' message if the user tried to process only ignored file.

Actual behaviour

The error message error Cannot process specified file: it’s ignored is produced and a non-zero return code returned.

@JeffersonBledsoe JeffersonBledsoe added 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Oct 7, 2020
@wooorm
Copy link
Member

wooorm commented Oct 7, 2020

There’s a silentlyIgnore options, that does your expected behavior: https://github.com/unifiedjs/unified-engine/blob/main/doc/options.md#optionssilentlyignore. Correct?

Ignoring files happens after finding them, because from the file, it starts looking for an ignore file, to see if that includes it. Can’t be reversed.

@wooorm wooorm closed this as completed Oct 7, 2020
@wooorm wooorm added 🙋 no/question This does not need any changes and removed 🐛 type/bug This is a problem 🙉 open/needs-info This needs some more info labels Oct 7, 2020
@JeffersonBledsoe
Copy link
Author

Don't know how I missed that config option. Thanks for the help @wooorm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

2 participants