Skip to content

Fix a target path for docker execution #48

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

Merged
merged 1 commit into from
May 27, 2024

Conversation

suzuki
Copy link
Contributor

@suzuki suzuki commented Dec 12, 2023

About

  • phpstan-analyze-this-file and phpstan-analyze-file are not working when using docker

Reproduction

  • Open test-docker.php in this repository
  • M-x phpstan-analyze-this-file

Output of current codes

-*- mode: compilation; default-directory: "/tmp/phpstan.el/" -*-
Compilation started at Wed Dec 13 08:14:16

docker run --rm -v /tmp/phpstan.el/\:/app ghcr.io/phpstan/phpstan analyze --error-format\=raw --no-progress --no-interaction -c /app/tests/phpstan-docker.neon --memory-limit 4G -l 7 -- /tmp/phpstan.el/test-docker.php
Path /tmp/phpstan.el/test-docker.php does not exist

Compilation exited abnormally with code 1 at Wed Dec 13 08:14:17, duration 0.48 s
  • /tmp/phpstan.el/test-docker.php is wrong path
    • /app is missing

Output of fixed codes

-*- mode: compilation; default-directory: "/tmp/phpstan.el/" -*-
Compilation started at Wed Dec 13 08:15:27

docker run --rm -v /tmp/phpstan.el/\:/app ghcr.io/phpstan/phpstan analyze --error-format\=raw --no-progress --no-interaction -c /app/tests/phpstan-docker.neon --memory-limit 4G -l 7 -- /app/test-docker.php
/app/test-docker.php:4:Function f not found.
/app/test-docker.php:7:Constant Fooo not found.

Compilation exited abnormally with code 1 at Wed Dec 13 08:15:28, duration 1.05 s

@zonuexe zonuexe merged commit 94d373a into emacs-php:master May 27, 2024
@zonuexe
Copy link
Member

zonuexe commented May 27, 2024

Thank you!

@suzuki suzuki deleted the fix-source-path-for-docker branch November 11, 2024 21:50
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