Skip to content

Commit 1021be3

Browse files
committed
docs: make use of COMMAND-NAME variable
1 parent 72bd2a5 commit 1021be3

File tree

6 files changed

+19
-22
lines changed

6 files changed

+19
-22
lines changed

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,11 @@ Usage: spotless clean-that [-dDhV] [-s=<sourceCompatibility>] [-v=<useVersion>]
266266
CleanThat enables automatic refactoring of Java code.
267267
-a, --add-mutator[=mutator[,mutator...]...]
268268
Add a mutator to the list of mutators to use. Mutators are
269-
the individual refactoring steps CleanThat applies. A list
269+
the individual refactoring steps clean-that applies. A list
270270
of available mutators can be found in the "Additional Info"
271271
section.
272272
-d, --use-default-mutators
273-
Use the default mutators provided by CleanThat. Default
273+
Use the default mutators provided by clean-that. Default
274274
mutators are: <SafeAndConsensual>.
275275
(default: true)
276276
-D, --include-draft-mutators
@@ -283,7 +283,7 @@ CleanThat enables automatic refactoring of Java code.
283283
make sense for composite mutators
284284
-h, --help Show this help message and exit.
285285
-s, --source-compatibility=<sourceCompatibility>
286-
The source JDK version to use for the CleanThat mutators.
286+
The source JDK version to use for the clean-that mutators.
287287
This is used to determine the Java language features
288288
available.
289289
(default: 1.8)
@@ -325,14 +325,13 @@ output =
325325
```
326326
Usage: spotless eclipse-wtp [-hV] [-f]... [-t=<type>] [-v=<useVersion>]
327327
Runs Eclipse WTP formatter.
328-
-f, --config-file The path to the Eclipse WTP configuration file. For
328+
-f, --config-file The path to the eclipse-wtp configuration file. For
329329
supported config file options see spotless
330330
documentation (additional info links).
331331
-h, --help Show this help message and exit.
332-
-t, --type=<type> The type of the Eclipse WTP formatter. If not provided,
333-
the type will be guessed based on the first few files
334-
we find. If that does not work, we fail the formatting
335-
run.
332+
-t, --type=<type> The type of the eclipse-wtp. If not provided, the type
333+
will be guessed based on the first few files we find.
334+
If that does not work, we fail the formatting run.
336335
One of: CSS, HTML, JS, JSON, XML, XHTML
337336
-v, --use-version=<useVersion>
338337
The version of eclipse-wtp to use.
@@ -443,7 +442,7 @@ Runs google java format
443442
-r, --reflow-long-strings
444443
Reflow long strings.
445444
(default: false)
446-
-s, --style=<style> The style to use for the google java format.
445+
-s, --style=<style> The style to use for the google-java-format.
447446
One of: AOSP, GOOGLE
448447
(default: GOOGLE)
449448
-v, --use-version=<useVersion>
@@ -548,7 +547,7 @@ Runs palantir java format
548547
-h, --help Show this help message and exit.
549548
-j, --format-javadoc Format javadoc.
550549
(default: false)
551-
-s, --style=<style> The style to use for the palantir java format.
550+
-s, --style=<style> The style to use for the palantir-java-format.
552551
One of: PALANTIR, AOSP, GOOGLE
553552
(default: PALANTIR)
554553
-v, --use-version=<useVersion>

app/src/main/java/com/diffplug/spotless/cli/steps/ClangFormat.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ public class ClangFormat extends SpotlessFormatterStep {
4141
names = {"--clang-version", "-v"},
4242
required = true,
4343
defaultValue = "10.0.1",
44-
description = "The version of clang-format to use." + OptionConstants.DEFAULT_VALUE_SUFFIX)
44+
description = "The version of ${COMMAND-NAME} to use." + OptionConstants.DEFAULT_VALUE_SUFFIX)
4545
String version;
4646

4747
@CommandLine.Option(
4848
names = {"--clang-format-exec", "-c"},
49-
description = "The path to the clang-format executable." + OptionConstants.DEFAULT_VALUE_SUFFIX_BEGIN
49+
description = "The path to the ${COMMAND-NAME} executable." + OptionConstants.DEFAULT_VALUE_SUFFIX_BEGIN
5050
+ "looks on your PATH" + OptionConstants.DEFAULT_VALUE_SUFFIX_END)
5151
Path pathToExec;
5252

5353
@CommandLine.Option(
5454
names = {"--style", "-s"},
55-
description = "The style to use for clang-format.")
55+
description = "The style to use for ${COMMAND-NAME}.")
5656
String style;
5757

5858
@Override

app/src/main/java/com/diffplug/spotless/cli/steps/CleanThat.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static class DefaultValueProvider extends CustomVersion.CustomVersionDefaultValu
5959
names = {"--use-default-mutators", "-d"},
6060
defaultValue = "true",
6161
description =
62-
"Use the default mutators provided by CleanThat. Default mutators are: <${usage.cleanthat.defaultMutators}>."
62+
"Use the default mutators provided by ${COMMAND-NAME}. Default mutators are: <${usage.cleanthat.defaultMutators}>."
6363
+ OptionConstants.DEFAULT_VALUE_SUFFIX)
6464
boolean useDefaultMutators;
6565

@@ -69,7 +69,7 @@ static class DefaultValueProvider extends CustomVersion.CustomVersionDefaultValu
6969
split = OptionConstants.OPTION_LIST_SPLIT,
7070
paramLabel = "mutator",
7171
description =
72-
"Add a mutator to the list of mutators to use. Mutators are the individual refactoring steps CleanThat applies. A list of available mutators can be found in the \"Additional Info\" section. ")
72+
"Add a mutator to the list of mutators to use. Mutators are the individual refactoring steps ${COMMAND-NAME} applies. A list of available mutators can be found in the \"Additional Info\" section. ")
7373
List<String> addMutators;
7474

7575
@CommandLine.Option(
@@ -93,7 +93,7 @@ static class DefaultValueProvider extends CustomVersion.CustomVersionDefaultValu
9393
names = {"--source-compatibility", "-s"},
9494
defaultValue = "1.8",
9595
description =
96-
"The source JDK version to use for the CleanThat mutators. This is used to determine the Java language features available."
96+
"The source JDK version to use for the ${COMMAND-NAME} mutators. This is used to determine the Java language features available."
9797
+ OptionConstants.DEFAULT_VALUE_SUFFIX)
9898
String sourceCompatibility;
9999

app/src/main/java/com/diffplug/spotless/cli/steps/EclipseWtp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ static class DefaultValueProvider extends CustomVersion.CustomVersionDefaultValu
5454
@CommandLine.Option(
5555
names = {"-f", "--config-file"},
5656
arity = "0",
57-
description = "The path to the Eclipse WTP configuration file. "
57+
description = "The path to the ${COMMAND-NAME} configuration file. "
5858
+ "For supported config file options see spotless documentation (additional info links).")
5959
List<Path> configFiles;
6060

6161
@CommandLine.Option(
6262
names = {"-t", "--type"},
6363
description =
64-
"The type of the Eclipse WTP formatter. If not provided, the type will be guessed based on the first few files we find. If that does not work, we fail the formatting run."
64+
"The type of the ${COMMAND-NAME}. If not provided, the type will be guessed based on the first few files we find. If that does not work, we fail the formatting run."
6565
+ OptionConstants.VALID_VALUES_SUFFIX)
6666
Type type;
6767

app/src/main/java/com/diffplug/spotless/cli/steps/GoogleJavaFormat.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ static class DefaultValueProvider extends CustomVersion.CustomVersionDefaultValu
4343
@CommandLine.Option(
4444
names = {"--style", "-s"},
4545
defaultValue = "GOOGLE",
46-
description =
47-
"The style to use for the google java format." + OptionConstants.VALID_AND_DEFAULT_VALUES_SUFFIX)
46+
description = "The style to use for the ${COMMAND-NAME}." + OptionConstants.VALID_AND_DEFAULT_VALUES_SUFFIX)
4847
Style style;
4948

5049
public enum Style {

app/src/main/java/com/diffplug/spotless/cli/steps/PalantirJavaFormat.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ static class DefaultValueProvider extends CustomVersion.CustomVersionDefaultValu
4545
@CommandLine.Option(
4646
names = {"--style", "-s"},
4747
defaultValue = "PALANTIR",
48-
description =
49-
"The style to use for the palantir java format." + OptionConstants.VALID_AND_DEFAULT_VALUES_SUFFIX)
48+
description = "The style to use for the ${COMMAND-NAME}." + OptionConstants.VALID_AND_DEFAULT_VALUES_SUFFIX)
5049
Style style;
5150

5251
@CommandLine.Option(

0 commit comments

Comments
 (0)