ly95 / vsc.phpmd

VS Code extension for php, using phpmd.
MIT License
5 stars 2 forks source link

phpmd: The given file "undefined" does not exist. #17

Open ipeevski opened 7 years ago

ipeevski commented 7 years ago

I get a lot of errors in the phpmd log. It seems to be related to trying to run PHPMD on non-php files or non-existing files (like git diffs, temporary files, etc).

Here is an example of what my log looks like:

[Error - 11:16:28 am] phpmd: The given file "undefined" does not exist.
[Error - 11:16:28 am] phpmd: 

[Error - 11:16:30 am] phpmd: The given file "undefined" does not exist.
[Error - 11:16:30 am] phpmd: 

[Error - 11:16:44 am] phpmd: The given file "undefined" does not exist.
[Error - 11:16:44 am] phpmd: 

[Error - 11:16:56 am] phpmd: The given file "undefined" does not exist.

[Error - 1:19:20 pm] phpmd: The given file "undefined" does not exist.

[Error - 1:21:03 pm] phpmd: The given file "undefined" does not exist.
[Error - 1:21:03 pm] phpmd: 

[Error - 1:21:18 pm] phpmd: The given file "undefined" does not exist.

[Error - 1:21:20 pm] phpmd: The given file "undefined" does not exist.
[Error - 1:21:20 pm] phpmd: 

[Error - 1:21:25 pm] phpmd: The given file "undefined" does not exist.

[Error - 1:22:09 pm] phpmd: The given file "undefined" does not exist.

[Error - 3:07:39 pm] phpmd: The given file "undefined" does not exist.

[Error - 3:21:55 pm] phpmd: The given file "undefined" does not exist.

[Error - 3:22:02 pm] phpmd: The given file "undefined" does not exist.

[Error - 3:22:04 pm] phpmd: The given file "undefined" does not exist.
[Error - 3:22:04 pm] phpmd: 

[Error - 3:22:10 pm] phpmd: The given file "undefined" does not exist.

[Error - 3:22:11 pm] phpmd: The given file "undefined" does not exist.
[Error - 3:22:11 pm] phpmd: 

[Error - 3:22:14 pm] phpmd: The given file "undefined" does not exist.

[Error - 3:22:14 pm] phpmd: The given file "undefined" does not exist.
[Error - 3:22:14 pm] phpmd: 

[Error - 4:33:50 pm] phpmd: The given file "undefined" does not exist.

[Error - 4:33:59 pm] phpmd: The given file "undefined" does not exist.

[Error - 4:34:00 pm] phpmd: The given file "undefined" does not exist.
[Error - 4:34:00 pm] phpmd: 

[Error - 4:34:10 pm] phpmd: The given file "undefined" does not exist.
[Error - 4:34:10 pm] phpmd: 

[Error - 4:35:34 pm] phpmd: The given file "undefined" does not exist.

[Error - 4:35:42 pm] phpmd: The given file "undefined" does not exist.
brysem commented 6 years ago

Is it possible to prevent phpmd from running when a file does not exist? It is very annoying that the Output window of VSCode appears every time I am working on a file that has not been saved yet to the filesystem.

If you can point me to the right place in the code, I can implement this feature with a pull request.

I just noticed that this issue has gone unanswered for almost a year. Is this project still being maintained?