| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
CLOC.Builder |
cores(int value)
Set the number of cores to use for executing the command.
|
CLOC.Builder |
docstringAsCode(boolean value)
Controls whether
cloc treats docstrings as code. |
CLOC.Builder |
followLinks(boolean value)
Follow symbolic links to directories.
|
CLOC.Builder |
maxFileSize(int value)
Skip files exceeding the specified maximum size in megabytes.
|
CLOC.Builder |
noRecurse(boolean value)
Count files in the given directories without recursively descending into their subdirectories.
|
CLOC.Builder |
readBinaryFiles(boolean value)
Process binary files in addition to text files.
|
CLOC.Builder |
skipUniqueness(boolean value)
Skip the file uniqueness check.
|
@NotNull CLOC |
target(@NotNull Path path)
Create a new command instance targeting the specified path.
|
CLOC.Builder |
timeout(int value)
Set the timeout for executing the command.
|
@Contract(value="_ -> this") public CLOC.Builder timeout(int value)
value - the timeout in seconds, or 0 for no timeout.IllegalArgumentException - if the timeout is less than 0.@Contract(value="_ -> this") public CLOC.Builder cores(int value)
value - the number of cores to use, or 0 to disable multiprocessing.IllegalArgumentException - if the number of cores is lower than 0.@Contract(value="_ -> this") public CLOC.Builder docstringAsCode(boolean value)
cloc treats docstrings as code.
By default, docstrings are seen as comments,
but they may also be regular strings in assignments or function arguments.value - true to treat docstrings as code, false to treat them as comments.@Contract(value="_ -> this") public CLOC.Builder followLinks(boolean value)
value - whether symbolic links should be followed.@Contract(value="_ -> this") public CLOC.Builder maxFileSize(int value)
The underlying command needs approximately twenty times the largest file's size in memory. Processing files larger than 100 MB on a system with less than 2 GB of RAM may lead to issues.
value - the maximum file size in megabytes.@Contract(value="_ -> this") public CLOC.Builder noRecurse(boolean value)
value - whether to prevent recursion into subdirectories.@Contract(value="_ -> this") public CLOC.Builder readBinaryFiles(boolean value)
This is usually a bad idea and should only be attempted with text files that have embedded binary data.
value - whether to process binary files.@Contract(value="_ -> this") public CLOC.Builder skipUniqueness(boolean value)
This will give a performance boost at the expense of counting files with identical contents multiple times (if such duplicates exist).
value - whether to skip the file uniqueness check.@Contract(value="_ -> new") @NotNull public @NotNull CLOC target(@NotNull @NotNull Path path)
path - the path to target, mustn't be null.NullPointerException - if the path is null.IllegalArgumentException - if the path doesn't exist.Copyright © 2024 SEART. All rights reserved.