Fix: Make all 'relative paths' absolute (#28196)

# Fix: Make all 'relative paths' absolute

The phpcs ruleset xml file's relative exclude patterns are relative to
the filename(s) provided on the command line.
Hence with partial verifications, the path exclusion does not function
as we would like.
Removing the relative-path attribute from the patterns the exclusion
works.
At the same time, the patterns were optimized and a comment was added.
This commit is contained in:
MDW 2024-02-16 12:59:04 +01:00 committed by GitHub
parent 7e652b9f9f
commit acf09b805f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,20 +5,20 @@
<arg name="tab-width" value="4"/>
<arg name="extensions" value="php" />
<exclude-pattern type="relative">build/html</exclude-pattern>
<exclude-pattern type="relative">build/aps</exclude-pattern>
<exclude-pattern type="relative">dev/tools/test/namespacemig</exclude-pattern>
<!-- <exclude-pattern type="relative">dev/initdata/dbf/includes</exclude-pattern> -->
<exclude-pattern type="relative">documents</exclude-pattern>
<exclude-pattern type="relative">htdocs/core/class/lessc.class.php</exclude-pattern>
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">htdocs/install/doctemplates/websites</exclude-pattern>
<exclude-pattern type="relative">htdocs/conf.php</exclude-pattern>
<exclude-pattern type="relative">*/nltechno*</exclude-pattern>
<exclude-pattern type="relative">source</exclude-pattern>
<exclude-pattern type="relative">.git</exclude-pattern>
<exclude-pattern type="relative">.cache</exclude-pattern>
<!-- info: '*' is replaced with '.*', so better use '+' in some cases -->
<!-- info: 'relative' paths are relative to the examined file, so not ok. -->
<exclude-pattern>/build/(html|aps)/</exclude-pattern>
<exclude-pattern>/dev/tools/test/namespacemig/</exclude-pattern>
<!-- <exclude-pattern>dev/initdata/dbf/includes</exclude-pattern> -->
<exclude-pattern>/documents/</exclude-pattern>
<exclude-pattern>/htdocs/core/class/lessc\.class\.php</exclude-pattern>
<exclude-pattern>/htdocs/(custom|includes)/</exclude-pattern>
<exclude-pattern>/htdocs/install/doctemplates/websites</exclude-pattern>
<exclude-pattern>/htdocs/([^/]+/)?conf\.php</exclude-pattern>
<exclude-pattern>*/nltechno*</exclude-pattern>
<exclude-pattern>/source/</exclude-pattern>
<exclude-pattern>/\.git/</exclude-pattern>
<exclude-pattern>/\.cache/</exclude-pattern>
<!-- List of all tests -->