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

Extension doesn't work via remote ssh #59

Open
jjasoncool opened this issue Sep 28, 2021 · 2 comments
Open

Extension doesn't work via remote ssh #59

jjasoncool opened this issue Sep 28, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jjasoncool
Copy link

jjasoncool commented Sep 28, 2021

Describe the bug
The extension doesn't have any action after install.
command line has normal behavior.

To Reproduce
Steps to reproduce the behavior:

  1. just install extension
  2. Click Format Document
  3. Anything doesn't happen.

Expected behavior
The document should format by PSR standard.
And will show error or warning in documents.

Environment

  • OS: fedora 34
  • VSCode version: 1.60.2
  • PHP CLI version: 8.0.11 use docker by (exec docker run --rm --publish-all -v $PWD:/source -v /tmp:/tmp -v /opt:/opt -v /home:/home -w /source php:phpcs php "$@")
  • squizlabs/PHP_CodeSniffer version: PHP_CodeSniffer version 3.6.0 (stable) (global ✔)
  • phpcs and phpcbf in the same way like php do.

dockerfile

FROM php:cli-alpine
# RUN cp "/usr/local/etc/php/php.ini-production" "/usr/local/etc/php/php.ini"
RUN apk update && apk add bash \
    curl \
    unzip

# composer
RUN curl -s https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
RUN composer global require squizlabs/php_codesniffer
RUN ln -s /root/.composer/vendor/bin/phpcs /usr/local/bin/phpcs && \
    ln -s /root/.composer/vendor/bin/phpcbf /usr/local/bin/phpcbf

COPY ./php.ini /usr/local/etc/php/php.ini

Extension settings

{
    "phpSniffer.run": "onSave",
    "phpSniffer.onTypeDelay": 250,
    "phpSniffer.executablesFolder": "",
    "phpSniffer.autoDetect": true,
    "phpSniffer.standard": "psr12",
    "phpSniffer.snippetExcludeSniffs" : [],
}

Additional context
I can do normal phpcs and phpcbf in command line.
But the extension doesn't work.

圖片

@jjasoncool jjasoncool added the bug Something isn't working label Sep 28, 2021
@jjasoncool jjasoncool changed the title extension doesn't work via remote ssh Extension doesn't work via remote ssh Sep 28, 2021
@wongjn
Copy link
Owner

wongjn commented Sep 28, 2021

Did you install the extension remotely? Otherwise not sure what else would be wrong here.

@jjasoncool
Copy link
Author

Did you install the extension remotely? Otherwise not sure what else would be wrong here.

I have installed.

@wongjn wongjn added the help wanted Extra attention is needed label Sep 29, 2021
@wongjn wongjn removed their assignment Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants