|
| 1 | +# Duplo (C/C++/Java Duplicate Source Code Block Finder) |
| 2 | + |
| 3 | +This project is found in GitHub: [https://github.com/dlidstrom/Duplo](https://github.com/dlidstrom/Duplo). |
| 4 | + |
| 5 | +## General Information |
| 6 | + |
| 7 | +Duplicated source code blocks can harm maintainability of software systems. |
| 8 | +Duplo is a tool to find duplicated code blocks in large C, C++, Java, C# and |
| 9 | +VB.Net systems. |
| 10 | + |
| 11 | +## Maintainer |
| 12 | + |
| 13 | +Duplo was originally developed by Christian |
| 14 | +M. Ammann and is now maintained and developed by Daniel |
| 15 | +Lidström. |
| 16 | + |
| 17 | +## Usage |
| 18 | + |
| 19 | +Duplo works with a list of files. You can either specify a file that contains the list of files, or you can pass them using `stdin`. |
| 20 | + |
| 21 | +Run `duplo --help` on the command line to see the detailed options. |
| 22 | + |
| 23 | +### Passing files using `stdin` |
| 24 | + |
| 25 | +```bash |
| 26 | +# unix |
| 27 | +> find . \( -iname "*.cpp" -o -iname "*.h" \) | docker run dlidstrom/duplo - out.txt |
| 28 | + |
| 29 | +# windows |
| 30 | +> Get-ChildItem -Include "*.cpp", "*.h" -Recurse | % { $_.FullName } | docker run dlidstrom/duplo - out.txt |
| 31 | +``` |
| 32 | +
|
| 33 | +`duplo` will write the duplicated blocks into `out.txt`. |
| 34 | +
|
| 35 | +### Passing files using file |
| 36 | +
|
| 37 | +`duplo` can analyze files specified in a separate file: |
| 38 | +
|
| 39 | +```bash |
| 40 | +# unix |
| 41 | +> find . -type f \( -iname "*.cpp" -o -iname "*.h" \) > files.lst |
| 42 | +> docker run dlidstrom/duplo files.lst out.txt |
| 43 | + |
| 44 | +# windows |
| 45 | +> Get-ChildItem -Include "*.cpp", "*.h" -Recurse | % { $_.FullName } | Out-File -encoding ascii files.lst |
| 46 | +> docker run dlidstrom/duplo.exe files.lst out.txt |
| 47 | +``` |
| 48 | +
|
| 49 | +## Feedback and Bug Reporting |
| 50 | +
|
| 51 | +Please open a GitHub issue to discuss feedback, |
| 52 | +feature requests and bug reports. |
| 53 | +
|
| 54 | +## License |
| 55 | +
|
| 56 | +Duplo is free software; you can redistribute it and/or modify |
| 57 | +it under the terms of the GNU General Public License as published by |
| 58 | +the Free Software Foundation; either version 2 of the License, or |
| 59 | +(at your option) any later version. |
| 60 | +
|
| 61 | +Duplo is distributed in the hope that it will be useful, |
| 62 | +but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 63 | +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 64 | +GNU General Public License for more details. |
| 65 | +
|
| 66 | +You should have received a copy of the GNU General Public License |
| 67 | +along with Duplo; if not, write to the Free Software |
| 68 | +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 69 | +
|
| 70 | +--- |
0 commit comments