Skip to content

Commit

Permalink
[doc] Document Ant Task parameter threads
Browse files Browse the repository at this point in the history
Also change the default to "1" to be consistent with
CLI `--threads` parameter.

See also #3806
  • Loading branch information
adangel committed Feb 25, 2022
1 parent 36134ed commit 73940e2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/pages/pmd/userdocs/tools/ant.md
Expand Up @@ -122,6 +122,14 @@ The examples below won't repeat this taskdef element, as this is always required
</td>
<td>No</td>
</tr>
<tr>
<td>threads</td>
<td>
Sets the number of threads used by PMD. Set threads to <code>0</code> to disable multi-threading processing.
Default: 1
</td>
<td>No</td>
</tr>
</table>


Expand Down
Expand Up @@ -30,7 +30,7 @@ public class PMDTask extends Task {
private String rulesetFiles;
private boolean noRuleSetCompatibility;
private String encoding;
private int threads;
private int threads = 1; // same default as in PMDParameters (CLI)
private int minimumPriority;
private int maxRuleViolations = 0;
private String failuresPropertyName;
Expand Down
Expand Up @@ -60,7 +60,7 @@ public class PMDParameters {

@Parameter(names = { "--threads", "-threads", "-t" }, description = "Sets the number of threads used by PMD.",
validateWith = PositiveInteger.class)
private int threads = 1;
private int threads = 1; // see also default in PMDTask (Ant)

@Parameter(names = { "--benchmark", "-benchmark", "-b" },
description = "Benchmark mode - output a benchmark report upon completion; default to System.err.")
Expand Down

0 comments on commit 73940e2

Please sign in to comment.