php-code-sniffer-baseliner icon indicating copy to clipboard operation
php-code-sniffer-baseliner copied to clipboard

Error in runner

Open kukumagi opened this issue 4 years ago • 2 comments

Error in runner. php-code-sniffer-baseliner\src\PhpCodeSnifferRunner\Runner.php line 20 should be $cliCommand = sprintf($basePath.'/vendor/bin/phpcs -q --report=json'); Otherwise throws error

kukumagi avatar Oct 13 '21 10:10 kukumagi

Could you please add the error that is returned? Because this error shouldn't happen.

Did you execute the command in the root of your project?

jeroennoten avatar Nov 05 '21 14:11 jeroennoten

I am also experiencing an error with the command.

When running it from the project root:

vendor\bin\phpcs-baseliner.bat create-baseline
Running PHP_CodeSniffer (this may take a while)...
'vendor' is not recognized as an internal or external command,
operable program or batch file.
RuntimeException: The CLI command 'vendor/bin/phpcs -q --report=json --basepath="{PROJECT_ROOT}"' did not produce any output. in {PROJECT_ROOT}\vendor\isaac\php-code-sniffer-baseliner\src\PhpCodeSnifferRunner\Runner.php:26
Stack trace:
#0 {PROJECT_ROOT}\vendor\isaac\php-code-sniffer-baseliner\src\BaselineCreator.php(65): ISAAC\CodeSnifferBaseliner\PhpCodeSnifferRunner\Runner->run('{DOCUMENT_ROOT}...')
#1 {PROJECT_ROOT}\vendor\isaac\php-code-sniffer-baseliner\src\Application.php(95): ISAAC\CodeSnifferBaseliner\BaselineCreator->create()
#2 {PROJECT_ROOT}\vendor\isaac\php-code-sniffer-baseliner\src\Application.php(57): ISAAC\CodeSnifferBaseliner\Application->runCommand(Object(ISAAC\CodeSnifferBaseliner\Command\CreateBaseline))
#3 {PROJECT_ROOT}\vendor\isaac\php-code-sniffer-baseliner\bin\phpcs-baseliner(18): ISAAC\CodeSnifferBaseliner\Application->run('{DOCUMENT_ROOT}...', 'create-baseline')
#4 {PROJECT_ROOT}\vendor\bin\phpcs-baseliner(120): include('{DOCUMENT_ROOT}...')
#5 {main}

Note i have changed some personal pieces of the paths to {DOCUMENT_ROOT} and {PROJECT_ROOT}

MelchiorKokernoot avatar May 11 '23 11:05 MelchiorKokernoot