Closed jegtnes closed 10 years ago
This is a PHP error, so please look at:
'DirectoryIterator::__construct(/usr/local/etc/php-code-sniffer/Standards): failed to open dir: No such file or directory'
Does /usr/local/etc/php-code-sniffer/Standards
exist? This doesn't look related to the plugin, just the configuration on your machine. When you specify a --standard you are telling phpcs which coding standard to use, if you do not specify this, it will default to a standard. Unsure how it does this as I've not looked into the phpcs code in a while, but potentially you are hitting different code.
Closing the issue, as with the information I have this does not seem to be a bug.
I'm getting the error similar to this
phpcs: Uncaught UnexpectedValueException: DirectoryIterator::__construct(vendor/wimg/php-compatibility,vendor/wimg/php-compatibility): The system cannot find the path specified. (code: 3) in C:\Users\HAX63\AppData\Roaming\Composer\vendor\squizlabs\php_codesniffer\src\Util\Standards.php:93
in Visual Studio Code.
Help if you've any solution
Hi @hvsharma63
I'm no longer maintaining this plugin as I do not use Atom any more.. I believe https://github.com/atomlinter may be of interest to you
Okay. 👍
Hey there,
I've installed this package and set the right executable paths for phpcs, phpcsfixer, and phpmd. All of these have been installed with Homebrew.
Phpmd works, but when enabling phpcs I get an error every time the package runs. Looking at Atom's console, running the same command in Terminal results in the following UnexpectedValueExceptions:
Isolating the error to the command
/usr/local/bin/phpcs --report=checkstyle --standard=PSR2 /Path/to/File.php
I attempted to remove and tweak the parameters, and it seems the error is thrown by the '--standard=PSR2' flag. By removing this in the Terminal it works and returns warnings about my code.I'm not too familiar with PHPCS, so this might not be an issue related to the package, and if it's not—my apologies. :) A quick pointer in the right direction would be fabulous, though. Thanks!