vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.54k stars 659 forks source link

Git warning when scanning in mounted image on macOS #7772

Open ohader opened 2 years ago

ohader commented 2 years ago
fatal: not a git repository (or any parent up to mount point /Volumes)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

This happens when scanning inside an image mounted to /Volume/some-image im macOS (I had that in earlier Psalm v4 already, patched in locally and forgot to report).

https://github.com/vimeo/psalm/blob/11e60fa261c682627e6b85300dd6f424b87520b1/src/Psalm/IssueBuffer.php#L649-L653

That exception (or even throwable) cannot be caught there. Instead, having a possibility to explicitly enable Git lookups (branch, commit, ...) via Psalm configuration would be great.

mr-feek commented 2 years ago

Ah yeah i just ran into this also while running psalm on a remote filesystem with no git info present