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

phpcs Reports Errors When Opening Git Diffs (and Also in Random Cases) #200

Open
manuth opened this issue Apr 28, 2022 · 1 comment
Open

Comments

@manuth
Copy link

manuth commented Apr 28, 2022

phpcs reports following error:

phpcs: Request workspace/configuration failed with message: Unable to locate phpcs. Please add phpcs to your global path or use composer dependency manager to install it in your project locally.

What's quite strange is that this error not only occurs when opening a git diff view (as this opens a file with a git:/{path}-uri) but also in random cases. For some files, vscode seems to open a git:/{path}-uri without even ever opening a git diff view.

This, again, triggers the error mentioned before.

I think it might be a good idea to completely ignore (or at least provide an option to do so) documents with a git:/{path}-uri.

@danielpost
Copy link

I'm having a similar issue. As soon as I open a git diff view in VSCode phpcs fails to lint it and hangs, using 100% CPU:

[Trace - 9:40:21 PM] Received notification 'textDocument/didStartValidate'.
Params: {
    "textDocument": {
        "uri": "git:/Users/danielpost/dev/file.php?%7B%22path%22%3A%22XXX%22%2C%22ref%22%3A%22~%22%7D"
    }
}

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