Context
At places like
we report the full file location.
basepath is a config property that can be used to remove it, but doesn't fully work for this.
In our pipelines we have another path then in develop. And not every developer has the same prefix, nginx/apache locations vary.
So supporting multiple is needed to fix this for us.
To reproduce
In an apache docker container
php cbf
And see a File with /var/www/html/...
In a nginx container /usr/share/nginx/html/...
On bitbucket pipelines /opt/atlassian/pipelines/agent/build/...
The set to support is for us these 3, but currently unable to fix this natively
Work around
is use | sed and remove this prefix, but the substring process makes this process not reliable.
|
echo '...'.substr($file, ($fileLength - ($width - 6))); |
Please confirm:
Context
At places like
PHP_CodeSniffer/src/Reports/Code.php
Line 169 in 7566b4d
we report the full file location.
basepathis a config property that can be used to remove it, but doesn't fully work for this.In our pipelines we have another path then in develop. And not every developer has the same prefix, nginx/apache locations vary.
So supporting multiple is needed to fix this for us.
To reproduce
In an apache docker container
php cbfAnd see a File with
/var/www/html/...In a nginx container
/usr/share/nginx/html/...On bitbucket pipelines
/opt/atlassian/pipelines/agent/build/...The set to support is for us these 3, but currently unable to fix this natively
Work around
is use
| sedand remove this prefix, but the substring process makes this process not reliable.PHP_CodeSniffer/src/Reports/Code.php
Line 171 in 7566b4d
Please confirm:
masterbranch of PHP_CodeSniffer.