ly95 / vsc.phpmd

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

1.3.x - phpmd: No such phpmd executable: phpmd #13

Open zmni opened 8 years ago

zmni commented 8 years ago

Works fine on version 1.2.x, but shortly after update to above version, vscode no longer detect phpmd. Global path configure properly, on default setting, hardcode setting to absolute path, I try everything, nothing works.

Output from Developer Tools:

phpmd: No such phpmd executable: phpmd
    e.doShow                  @ messageService.ts:119
    e.show                    @ messageService.ts:103
    (anonymous function)      @ mainThreadMessageService.ts:53
    i.Class.derive._oncancel  @ winjs.base.raw.js:1641
    e.$showMessage            @ mainThreadMessageService.ts:23
    e.handle                  @ abstractThreadService.ts:34
    s                         @ ipcRemoteCom.ts:269
    f                         @ ipcRemoteCom.ts:226
    _combinedTickCallback     @ internal/process/next_tick.js:67
    _tickCallback             @ internal/process/next_tick.js:98
ly95 commented 8 years ago

In my case, It’s work fine.

Please post more info about PHPMD version with screenshots.

zmni commented 8 years ago

I'm using the latest phar version of phpmd v2.4.2

phpmd-v2 4 2

and available from global path :

phpmdpath

An error from VSCode using default settings :

phpmderror

List of installed extensions :

abusaidm.html-snippets
alefragnani.project-manager
EditorConfig.EditorConfig
HvyIndustries.crane
ikappas.phpcs
linyang95.phpmd
ms-vscode.PowerShell
robertohuertasm.vscode-icons
Tyriar.lorem-ipsum
wmaurer.change-case

settings.json :

// Place your settings in this file to overwrite the default settings
{
// Editor
  "editor.fontSize": 13,
  "editor.rulers": [80],
  "editor.insertSpaces": false,
  "editor.wrappingColumn": -1,
  "editor.quickSuggestionsDelay": 100,
  "editor.renderIndentGuides": true,

// Files
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.DS_Store": true,
    "**/.idea": true,
    "**/files": true,
    "**/upgrade": true,
    "**/uploads": true
  },
  "files.eol": "\n",
  "files.trimTrailingWhitespace": true,

// File Explorer
  "explorer.openEditors.visible": 0,
  "explorer.autoReveal": false,

// Git
  "git.path": "E:\\Git\\cmd\\git.exe",

// HTML
  "html.format.wrapLineLength": 0,

// Terminal
  "terminal.external.windowsExec": "E:\\Cmd\\ConEmu64.exe",
  "terminal.integrated.shell.windows": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe",

// Telemetry
  "telemetry.enableTelemetry": false,
  "telemetry.enableCrashReporter": false,

// PHP
  "php.validate.executablePath": "E:\\xampp\\php\\php.exe",
  "php.validate.run": "onType",

// PHPCS
  "phpcs.standard": "WordPress-Core",

// Crane
  "crane.showStatusBarBugReportLink": false,

// Project Manager
  "projectManager.openInNewWindow": false
}
zmni commented 8 years ago

I tried to disable phpmd through settings.json, but it still displaying an error.

phpmddisabled

ly95 commented 8 years ago

Thx reply. Very helpful. I will check it again.

artrz commented 7 years ago

To verify if phpmd is available this plugin tries to run it, so, even if the path is correctly set, if phpmd is unable to run (e.g. missing dependencies for PHP) the message will wrongly say that the exec could not be found. Try to manually run phpmd and check the output.