Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
traverse_files_upwards
to make searching up to the root possible
Previously, the meaning of `FileFinder.root_level` would be "first non searched directory", now it is "last searched directory". This is more intuitive in my opinion (I assumed this behavior from the beginning until I found out it was not like that), but also more "correct", because it allows you to search up to the root directory if `FileFinder.root_level` is set to "/". Note that this `FileFinder.root_level?` logic is only useful for testing to provide an isolated environment not affected by the external file system where the tests are running. When rubocop runs "normally", it's ignored. However, in follow up work, I plan to start using these code paths, and this change allows me to stop artificially passing the parent of the directory where I want to stop searching.
- Loading branch information