Open clemlatz opened 1 week ago
Thanks so much for your report!
Fatal Error: This is indeed a hidden bug. The current version triggers it when processing more than 1000 files at once. I have fixed this issue and removed the 1000-file limit.
Skip Option Not Working: This is more of a usage issue. I tested the skip option, and it works as expected. I will add documentation on this feature soon.
You can set any pattern supported by doublestar for the --skip
option. For example, if you want to skip the vendor
directory, you can use the following command:
docker run -it -v /Users/clement/Developer/biblys/biblys:/src ghcr.io/b1nary-gr0up/nwa:main add \
--copyright "Clément Latzarus" \
--license agpl-3.0-only \
--skip "vendor/**" \
**/*.php
or
docker run -it -v /Users/clement/Developer/biblys/biblys:/src ghcr.io/b1nary-gr0up/nwa:main add \
--copyright "Clément Latzarus" \
--license agpl-3.0-only \
--skip=vendor/** \
**/*.php
The use of double quotes (""
) or the equals sign (=
) is because some shells interpret **
in the command, which can cause it to fail. Using quotes and the equals sign avoids this problem.
It's truly a great joy to see my tool being able to help others. If you hadn't used it and submitted these pull requests, I might not have had the motivation to improve it further. Thank you for using it and for your pull requests ❤️
Describe the bug
When running nwa on my project for php files, I get a fatal error. I guess this is caused by the
vendor
directory which contains the dependencies (where I do not want to add the header) and a lot (~9500) files.Additionally, I've tried to used the
--skip
argument withvendor
but it does not seems to have an effect.To Reproduce
Steps to reproduce the behavior:
1. Clone my project
2. Install dependencies
eg. using docker
3. Run nwa on php files
3. Run nwa on php files with the --skip arg
Expected behavior
Either successfully add the header or display an explicit error that there is too much files (if this is indeed the issue).
Additionally, effectively ignore the
vendor
directory when using the--skip
argument (or improve documentation on this feature if I've used it the incorrectly).Environment:
Provided docker image
Additional context
I've worked around this issue by deleting the
vendor
folder so there is absolutely no emergency for me. But I'd thought it would be nice to fix this for future users.By the way, thank you for this awesome tool that saved me a lot of time and for being so reactive with my previous pull requests 🫶