Spurious "Unexpected item made it into the items" warnings
ravenexp opened this issue · comments
Describe the bug
Running cargo-spellcheck -v
produces a lot of spurious warnings when run inside a project directory which is a git repo.
To Reproduce
Steps to reproduce the behaviour:
cd
into a project directory which is a git repo.- Run
cargo spellcheck -v
- Get lots of warnings like:
[2022-08-17T10:55:38Z WARN cargo_spellcheck::traverse] Unexpected item made it into the items /home/user/project/.git/objects/59/576875cf478ce9bcda9b9c996096da3c035123
Expected behavior
Files from .git/
and directories listed in .gitignore
are silently ignored.
Please complete the following information:
- System: Arch Linux
- Obtained: pacman
- Version: cargo-spellcheck 0.11.2
Could you try with the latest git version and also provide the relevant config and a run with -vvv
as well as a listing ls -al
of the root dir from where you launch cargo-spellcheck
I cannot reproduce with latest master
, could you provide a minimal test case?
I've built cargo-spellcheck
from master and the same thing happens.
Complete steps:
mkdir foo; cd foo
mdbook init
git init
mdbook build
cargo-spellcheck -v
Outputs lots of WARN cargo_spellcheck::traverse] Unexpected item made it into the items
warnings.
ls -al
total 8
drwxr-xr-x 1 x y 60 Aug 17 16:12 ./
drwx------ 1 x y 2168 Aug 17 16:31 ../
drwxr-xr-x 1 x y 490 Aug 17 16:13 book/
-rw-r--r-- 1 x y 107 Aug 17 16:11 book.toml
drwxr-xr-x 1 x y 144 Aug 17 16:12 .git/
-rw-r--r-- 1 x y 5 Aug 17 16:11 .gitignore
drwxr-xr-x 1 x y 44 Aug 17 16:11 src/
Could you retry the latest master
- the warnings were a bit too focused on the use case around the use case in a cargo manifest dir - it's a cargo plugin after all. I reduced the warning level and .gitignore
is honoured now.