sandhje / vscode-phpmd

VSCode PHP Mess Detector extension
MIT License
15 stars 4 forks source link

Feature request: analyze onType #57

Open amaisano opened 4 years ago

amaisano commented 4 years ago

Provide an option to scan for problems onType, not just onSave.

sandhje commented 3 years ago

This is a bit harder than just calling the current handler on both save and change since phpmd cannot run on just the updated part of your code, which is the normal procedure for language server extensions when implementing the change event. The phpmd command line tool always needs to run on the entire file. Running phpmd for each change event would off course result in terrible performance since it is quite a heavy job that lasts up to a few hundred ms. Robust throttling will be needed. Not planning to add this on short term, maybe in a 2.0 version.