Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline error when checking php style with PHP_CODESniffer

fm42
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 23, 2019

Hello,

 

I have the following error when I'm using this script in Pipelines.

I'm trying

  1. to check the root folder of my git repository  path is "/"
  2. to exclude "PHP_CodeSniffer" folder

 

Here is the Fatal Error :

Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(//dev/fd/4/sys/class/thermal/cooling_device1/device/physical_node/node0/cpu7/driver/cpu5/firmware_node/subsystem/devices/device:06/physical_node/nvme/nvme0/nvme0n1/nvme0n1p9/subsystem/md127/md/dev-nvme1n1/block/device/device/subsystem/devices/0000:00:01.0/firmware_node/PNP0B00:00/physical_node/subsystem/devices/00:04/tty/ttyS0/subsystem/ttyS2/device/subsystem/devices/i8042/serio0/input/input0/subsystem/input1/device/driver/LNXSLPBN:00/driver/LNXPWRBN:00/subsystem/devices/LNXSYBUS:00/LNXCPU:01/physical_node/power): failed to open dir: Too many levels of symbolic links in /opt/atlassian/pipelines/agent/build/PHP_CodeSniffer/src/Filters/Filter.php:135Stack trace:#0 /opt/atlassian/pipelines/agent/build/PHP_CodeSniffer/src/Filters/Filter.php(135): RecursiveDirectoryIterator->__construct('//dev/fd/4/sys/...', 4608)#1 /opt/atlassian/pipelines/agent/build/PHP_CodeSniffer/src/Files/FileList.php(86): PHP_CodeSniffer\Filters\Filter->getChildre in /opt/atlassian/pipelines/agent/build/PHP_CodeSniffer/src/Filters/Filter.php on line 135

 

pipelines-error.png

 

pipelines.png

 

 

Do you have any idea what happen?

 

Regards,

1 answer

0 votes
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2019

Hi @fm42,

I am not too familiar with PHP CodeSniffer, but I found this in their docs: 

If you run PHP_CodeSniffer without specifying a coding standard, PHP_CodeSniffer will look in the current directory, and all parent directories, for a file called either .phpcs.xmlphpcs.xml.phpcs.xml.dist, or phpcs.xml.dist. If found, configuration information will be read from this file, including the files to check, the coding standard to use, and any command line arguments to apply.

https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file 

So I suspect you get the error because it tries to find configuration files. I wasn't able to find an option to turn this off. Might be worth raising an issue on CodeSniffer's issue page? https://github.com/squizlabs/PHP_CodeSniffer/issues

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events