praem90 / nvim-phpcsf

A simple nvim plugin wrapper for both phpcs and phpcbf.
https://praem90.github.io/nvim-phpcsf/
13 stars 3 forks source link

Arithmetic on nil value? #2

Closed dshumakerUT closed 7 months ago

dshumakerUT commented 2 years ago

Not sure why nvim-phpcsf is failing upon editing a php file.

Error executing vim.schedule lua callback: ...im/site/pack/packer/start/nvim-phpcsf/lua/phpcs/init.lua:112: attempt to perform arithmetic on a nil value
stack traceback:
        ...im/site/pack/packer/start/nvim-phpcsf/lua/phpcs/init.lua:112: in function 'callback'
        ...m/site/pack/packer/start/nvim-phpcsf/lua/phpcs/spawn.lua:40: in function 'cb'
        vim.lua:285: in function <vim.lua:285>

Using a pretty generic setup with packer

  use { 'praem90/nvim-phpcsf' }

The output of phpcs seems fine (ie it is composer installed within the ./vendor/bin directory)

vendor/bin/phpcs
...E................. 21 / 21 (100%)

FILE: /web/modules/custom/create_user/create_user.post_update.php
------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------
 39 | ERROR | [x] Expected 1 newline at end of file; 2 found
------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------

Time: 413ms; Memory: 12MB

Any ideas?

praem90 commented 7 months ago

Hope the newer version does not throw this error.