diff --git a/docs/pages/pmd/userdocs/cli_reference.md b/docs/pages/pmd/userdocs/cli_reference.md index 2e6350ebc8..541f49eb25 100644 --- a/docs/pages/pmd/userdocs/cli_reference.md +++ b/docs/pages/pmd/userdocs/cli_reference.md @@ -111,7 +111,7 @@ The tool comes with a rather extensive help text, simply running with `-help`! %} {% include custom/cli_option_row.html options="-reportfile,-r" option_arg="path" - description="Path to a file in which the report output will be sent. By default the report is printed on standard output." + description="Path to a file to which report output is written. The file is created if it does not exist. If this option is not specified, the report is rendered to standard output." %} {% include custom/cli_option_row.html options="-shortnames" description="Prints shortened filenames in the report." diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/cli/PMDParameters.java b/pmd-core/src/main/java/net/sourceforge/pmd/cli/PMDParameters.java index 94cd430553..73490891a2 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/cli/PMDParameters.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/cli/PMDParameters.java @@ -89,7 +89,10 @@ public class PMDParameters { converter = PropertyConverter.class) private List properties = new ArrayList<>(); - @Parameter(names = { "-reportfile", "-r" }, description = "Sends report output to a file; default to System.out.") + @Parameter(names = { "-reportfile", "-r" }, + description = "Path to a file to which report output is written. " + + "The file is created if it does not exist. " + + "If this option is not specified, the report is rendered to standard output.") private String reportfile = null; @Parameter(names = { "-version", "-v" }, description = "Specify version of a language PMD should use.")