1

I have below file structure

ROOT_FOLDER
 |    
 +-- FRAMEWORK_FOLDER
 |  |  
 |  +-- FRAMEWORK_FILE1.php
 |  +-- FRAMEWORK_FILE2.php
 |  +-- FRAMEWORK_FILE3.php
 |  \-- FRAMEWORK_FILE4.php
 |    
 +-- MY_FOLDER
 |  |  
 |  +-- MY_FILE.php

Now I want to check code duplication in my file with all my source code files. I am using below command

php phpcpd --log-pmd "MY_REPORT.xml" --names "ROOT_FOLDER/MY_FOLDER/MY_FILE.php" ./ROOT_FOLDER/FRAMEWORK_FOLDER/

This command gives me no file found to scan message

If I run below command

php phpcpd --log-pmd "MY_REPORT.xml" ./ROOT_FOLDER/FRAMEWORK_FOLDER/

It will compare my file with Source files but it also compares all source files with each other.

I am getting all duplication from my file as well as from my Framework's source files.

How can I only check my file with all of my Framework's source file while skipping all source files to compare with each other.

Please let me know if there is an alternate to this approach. Any other php module or some other code package.

Ankur Bhadania
  • 4,123
  • 1
  • 23
  • 38

0 Answers0