Skip to content

Commit

Permalink
Merge pull request #3807 from adangel:doc-ant-threads
Browse files Browse the repository at this point in the history
[doc] Document Ant Task parameter threads #3807

* pr-3807:
  [doc] Update release notes (#3807) [skip ci]
  [doc] Document Ant Task parameter `threads`
  • Loading branch information
adangel committed Feb 25, 2022
2 parents 9a437b0 + 7451623 commit dd07a00
Show file tree
Hide file tree
Showing 4 changed files with 11 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
1 change: 1 addition & 0 deletions docs/pages/release_notes.md
Expand Up @@ -21,6 +21,7 @@ This is a {{ site.pmd.release_type }} release.
* [#3768](https://github.com/pmd/pmd/issues/3768): \[core] SARIF formatter reports multiple locations when it should report multiple results
* doc
* [#2502](https://github.com/pmd/pmd/issues/2502): \[doc] Add floating table-of-contents (toc) on the right
* [#3807](https://github.com/pmd/pmd/pull/3807): \[doc] Document Ant Task parameter `threads`
* java
* [#3698](https://github.com/pmd/pmd/issues/3697): \[java] Parsing error with try-with-resources and qualified resource
* java-bestpractices
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 dd07a00

Please sign in to comment.