Skip to main content
Version: 1.3.3

Examples

Language specification

To specify the language of the source code:

./reson \
--source-path src \
--languages rust

To specify multiple languages, separate them with commas:

./reson \
--source-path src \
--languages rust,python

Exclude directories

Glob patterns can be used to exclude directories from the detection. For example, to exclude all directories named test:

./reson \
--source-path src \
--excludes "**/test/**"

To exclude multiple directories, separate them with commas:

./reson \
--source-path src \
--excludes "test,build"

To exclude all files with a specific extension, use the following pattern:

./reson \
--source-path src \
--excludes "**/*.md"

To exclude all files with a specific name, use the following pattern:

./reson \
--source-path src \
--excludes "**/README.md"

Custom threshold

To set a custom threshold for the minimum number of lines to consider as duplicates:

./reson \
--source-path src \
--threshold 10

Output to file

To detect code duplication in the src directory, and output the results to result.json:

./reson \
--source-path src \
--output-format json \
--output-file result.json

Without specifying the "--output-file" option, the results will be printed to the duplications file in the current directory.


## Maximum file size

To set the maximum file size to process in bytes:

```shell
./reson \
--source-path src \
--max-file-size 1048576

Number of threads

To specify the number of threads to use for processing, more threads can speed up the detection process:

./reson \
--source-path src \
--threads 10