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

error : "Could not open input file: analyze" #6

Open
kermorgant opened this issue May 1, 2018 · 2 comments
Open

error : "Could not open input file: analyze" #6

kermorgant opened this issue May 1, 2018 · 2 comments

Comments

@kermorgant
Copy link
Contributor

Hi,

Thank you for your work on this package.

I'm been using spacemacs (develop branch) and phpstan separately for some time, but after having discovered this package, I wanted to give it a try.

I tried with phpstan installed globally and falled back to docker, but had the same error on both attempts

Suspicious state from syntax checker phpstan: Flycheck checker phpstan returned non-zero exit code 1, but its output contained no errors: Could not open input file: analyze

Can that error message tell what is wrong with my setup ?

I'm using this in .dir-locals.el

((nil . ((php-project-root . git)
         (phpstan-executable . docker)
         (phpstan-working-dir . (root . "."))
         (phpstan-config-file . (root . "./phpstan.neon"))
         (phpstan-level . 7))))

Then, I've begun a private php layer where I initialize some things and which could contain the source of this error, but it is more a spacemacs thing so I'lle leave it out for now.

@kermorgant kermorgant changed the title setup with spacemacs error : "Could not open input file: analyze" May 1, 2018
@kermorgant
Copy link
Contributor Author

fired up the debugger and it seems the "phpstan-get-executable" returns null, which leads to this error message.

Seems having phpstan installed globally is not supported, right ?
Then, for the docker way, I might need to setup it properly, I might have overlooked its installation

kermorgant added a commit to kermorgant/phpstan.el that referenced this issue May 1, 2018
I'll let you see if this is a good way to handle this use case, but adding this line let me link phpstan-executable to the absolute path of phpstan.

Otherwise, it was ignored : emacs-php#6
@zonuexe
Copy link
Member

zonuexe commented May 3, 2018

@kermorgant Thank you for pointing that out.
The problem seems to have been resolved by your contribution. (I thought it at the time of documentation, but the implementation was missing)

Now I am on a journey to visit my old friend, so I apologize that I can not respond at once.

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

No branches or pull requests

2 participants