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

Find composer.json when searching for psalm #3979

Merged

Conversation

diskshima
Copy link
Contributor

This PR adds a lookup for a directory with composer.json in it when trying to find the psalm executable under vendor/bin.
Previously it looked for the .git/ directory but some projects may not necessarily have their vendor/bin directory placed at their project root.

Execute(The project path should be correct for composer.json file):
call ale#test#SetFilename('../test-files/php/with-composer/test.php')

AssertLSPProject ale#path#Simplify(g:dir . '/../test-files/php/with-composer')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using AssertLSPProject here but not sure if this is the best way to test this case.
I'll be more than happy to be corrected ;)

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the contribution.

@hsanson hsanson merged commit 31dc6a6 into dense-analysis:master Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants