sebastianbergmann/phpcpd

Add support for configuration file

sebastianbergmann opened this issue · 4 comments

<?xml version="1.0" encoding="UTF-8"?>
<phpcpd
    strategy="SebastianBergmann\PHPCPD\Detector\Strategy\DefaultStrategy"
    minimumLines="5"
    minimumTokens="70"
    fuzzy="true">

    <fileset>
        <include>
            <directory>foo</directory>
            <file>bar.phtml</file>
        </include>
        <exclude>bar</exclude>
        <name>*.php</name>
        <notName>*.fail.php</notName>
    </fileset>

    <logging>
        <log type="pmd" target="pmd-cpd.xml"/>
        <log type="text" target="cpd.txt"/>
    </logging>
</phpcpd>
  • Hi, i'm using phpcpd to check my codes. But i would like to config statics like this config. I have some questions.
    1.Where do i put this file in my source ?
    2.What's the name of this file ?
  1. How can I load this file when i run command line ?
  2. if you can, could you give to me example ?
    Thank you

@sebastianbergmann are you going to add this feature soon? It would be very helpful for my projects if I could ignore some directories.

Would be great if it uses the same param names as phpcs/phpmd like <exclude-pattern>

@sebastianbergmann Do you have any estimate for implementing this feature?