better-phpunit icon indicating copy to clipboard operation
better-phpunit copied to clipboard

CodeLens support

Open danilopolani opened this issue 6 years ago • 2 comments

First of all: great extension! Since I'm lazy and I don't want everytime to open Cmd+Shift+P etc., I thought it would be nice to have a CodeLens support. Please find below a quick video preview (don't mind the errors on bottom right, just other extensions crashing):

Video Preview

Features

  • Run test label before every test with ability to run that single test
  • Run class tests label before class name with ability to run that class
  • The existing features are still there, nothing was removed of course
  • You can disable CodeLens setting better-phpunit.codelens to false in your settings

Additional notes

I wrote a temporary fix for this issue: https://github.com/glayzzle/php-parser/issues/250 . As soon that bug will be solved, we should update the dependency and remove the code. I'll take care of it.

I allowed myself to update composer.json with the new minor version (1.5.0), but I noticed you're not pushing tags to keep tracking of the releases. You should definitely create tags for them, writing git tag -a v1.5.0 -m "CodeLens support" or just git tag v1.5.0 and then git push origin --tags.

If you want, you can update the GIF in the README too.

Credits

Apart from php-parser, the engine behind the file parser, I would thank https://github.com/recca0120/phpunit-language-server for giving me the idea to let this work.

danilopolani avatar Apr 06 '19 17:04 danilopolani

Hello @calebporzio , any chance to review this? It would be awesome. Thanks!

danilopolani avatar Apr 10 '19 09:04 danilopolani

PS: For everyone interested, I pushed a fix for the bug I before wrote in the description and also committed a package for this feature, you can download it here 'til this PR will be reviewed: https://github.com/calebporzio/better-phpunit/blob/9bc85b008c234b054f641aa8aa47b40fc206cb45/packaged_releases/better-phpunit-1.5.0.vsix


Since no feedback here, I decided to create my own extension: https://github.com/danilopolani/vscode-yet-another-phpunit

danilopolani avatar Apr 10 '19 13:04 danilopolani