ikappas / vscode-phpcs

PHP CodeSniffer for Visual Studio Code
MIT License
128 stars 56 forks source link

Add setting to disable stdin-path flag #121

Closed chaance closed 4 years ago

chaance commented 6 years ago

In reference to https://github.com/ikappas/vscode-phpcs/issues/119

pcmanik commented 6 years ago

@ikappas Can you merge this please? I can't work with phpcs cuz of this bug on MacOS.

mfdeveloper commented 6 years ago

Hello @chancestrickland. This is a great PR!!

You forgot to add the phpcs.stdin configuration to phpcs/package.json file:

"phpcs.stdin": {
   "scope": "resource",
   "type": "boolean",
    "default": false,
    "description": "Allows add or remove the `phpcs --stdin-path` flag (supported only for versions 2.6.0 and above)."
}

I've added this and others changes to allow use phpcs like a docker container. Is mixed with this change, because is all related with #119 for me.

Can I submit a PR for your fork @chancestrickland ?

sasha6806 commented 5 years ago

I need a new release with the commits. Coz I don't know how to install vscode extension manually.

mfdeveloper commented 5 years ago

Hi @sasha6806 !

Try follow one of the steps described below:

I hope that help you. Please, give us a feedback whether it works for you :)

sasha6806 commented 5 years ago

Hi @mfdeveloper It's very sad I failed Run/Debug Development version on my PHP project. After npm install operation, I go into client+server debugging and the second window is appeared with my php project. but on the same time, it still popup a note : phpcs: Unable to locate phpcs. Invalid version string encountered! (I did all changes of sources following #121 commits) in addition, I use npm install vsce to make a .vsix package of phpcs. but failed too. following with logs file. 2019-01-30T13_18_54_888Z-debug.log I'm not good at npm and ts. and don't know how to do it then.

mfdeveloper commented 5 years ago

@sasha6806 I saw the npm log file, and I think that you need install typescript globally in your system. The vscode plugins are written using typescript language, and needs the tsc compiler to run directly (with debug) or to generate the .vsix extension.

Are you using Windows? I don't use this S.O for development, because "stranger things" happens haha. These guides that I share with you early, works for me in a Ubuntu S.O

ninjasitm commented 5 years ago

Hello,

Will this be merged? I'm experiencing the issue with --stdin-path options and this patch will solve these problems.