codeclimate / codeclimate-phpcodesniffer

Code Climate Engine for PHP Code Sniffer
MIT License
28 stars 23 forks source link

Build failing: Referenced sniff does not exist #93

Open dafeder opened 2 years ago

dafeder commented 2 years ago

We've been using codeclimate for a long time on the open source DKAN project. For the last few weeks all of our builds are failing with the error Referenced sniff "SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" does not exist.

Here is a failing build:

https://codeclimate.com/github/GetDKAN/dkan/builds/2781

We're using only the phpcodesniffer plugin (beta channel), using the Drupal and DrupalPractice standards. Here is the .codeclimate.yml from that particular build.

I have the CLI tool locally and can run codeclimate analyze successfully on the same commit.

The full stack trace from the build:

Exception: ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" does not exist

Run "phpcs --help" for usage information

 in /usr/src/app/vendor/squizlabs/php_codesniffer/src/Runner.php
#0 /usr/src/app/Executor.php(116): PHP_CodeSniffer\Runner->init()
#1 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1934): Executor->run()
#2 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1846): fork_daemon->invoke_callback()
#3 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1747): fork_daemon->fork_work_unit()
#4 /usr/src/app/vendor/barracudanetworks/forkdaemon-php/fork_daemon.php(1499): fork_daemon->process_work_unit()
#5 /usr/src/app/Executor.php(33): fork_daemon->process_work()
#6 /usr/src/app/engine.php(26): Executor->queueDirectory()
#7 {main}Exception: ERROR: Referenced sniff "SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" does not exist
efueger commented 2 years ago

Hey @dafeder - can you push a new commit to that PR? We've updated things on the beta channel that should make this work now 👌🏼

Thanks!

dafeder commented 2 years ago

Hi - this appears to have resolved our issue, sorry for the delay in response!