Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Find composer.json when searching for psalm#3979

Merged
hsanson merged 2 commits intodense-analysis:masterdense-analysis/ale:masterfrom
diskshima:psalm-add-support-for-composer-jsondiskshima/ale:psalm-add-support-for-composer-jsonCopy head branch name to clipboard
Nov 15, 2021
Merged

Find composer.json when searching for psalm#3979
hsanson merged 2 commits intodense-analysis:masterdense-analysis/ale:masterfrom
diskshima:psalm-add-support-for-composer-jsondiskshima/ale:psalm-add-support-for-composer-jsonCopy head branch name to clipboard

Conversation

@diskshima
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.