| 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)
cloc considers docstrings to be comments, but this is not always correct as docstrings represent
regular strings when they appear on the right hand side of an assignment or as function arguments. |
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 less than 0.@Contract(value="_ -> this") public CLOC.Builder docstringAsCode(boolean value)
cloc considers docstrings to be comments, but this is not always correct as docstrings represent
regular strings when they appear on the right hand side of an assignment or as function arguments. This
switch controls whether docstrings should be treated as code.value - whether docstrings should be treated as code.@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, must not be null.NullPointerException - if the path is null.IllegalArgumentException - if the path does not exist.Copyright © 2024 SEART. All rights reserved.