Skip to content

Extension doesn't work via remote ssh #59

Description

@jjasoncool

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.

圖片

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions