Skip to content

Commit

Permalink
Update install doc
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 committed Nov 21, 2021
1 parent 6351472 commit 890b0e8
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/doc/man/cargo-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ See also the `--profile` option for choosing a specific profile by name.

{{#options}}
{{> options-display }}

{{> options-message-format }}

{{/options}}

{{> section-options-common }}
Expand Down
28 changes: 28 additions & 0 deletions src/doc/man/generated_txt/cargo-install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,34 @@ OPTIONS
May also be specified with the term.color config value
<https://doc.rust-lang.org/cargo/reference/config.html>.

--message-format fmt
The output format for diagnostic messages. Can be specified multiple
times and consists of comma-separated values. Valid values:

o human (default): Display in a human-readable text format.
Conflicts with short and json.

o short: Emit shorter, human-readable text messages. Conflicts with
human and json.

o json: Emit JSON messages to stdout. See the reference
<https://doc.rust-lang.org/cargo/reference/external-tools.html#json-messages>
for more details. Conflicts with human and short.

o json-diagnostic-short: Ensure the rendered field of JSON messages
contains the "short" rendering from rustc. Cannot be used with
human or short.

o json-diagnostic-rendered-ansi: Ensure the rendered field of JSON
messages contains embedded ANSI color codes for respecting
rustc's default color scheme. Cannot be used with human or short.

o json-render-diagnostics: Instruct Cargo to not include rustc
diagnostics in in JSON messages printed, but instead Cargo itself
should render the JSON diagnostics coming from rustc. Cargo's own
JSON diagnostics and others coming from rustc are still emitted.
Cannot be used with human or short.

Common Options
+toolchain
If Cargo has been installed with rustup, and the first argument to
Expand Down
25 changes: 25 additions & 0 deletions src/doc/src/commands/cargo-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,31 @@ terminal.</li>
<a href="../reference/config.html">config value</a>.</dd>



<dt class="option-term" id="option-cargo-install---message-format"><a class="option-anchor" href="#option-cargo-install---message-format"></a><code>--message-format</code> <em>fmt</em></dt>
<dd class="option-desc">The output format for diagnostic messages. Can be specified multiple times
and consists of comma-separated values. Valid values:</p>
<ul>
<li><code>human</code> (default): Display in a human-readable text format. Conflicts with
<code>short</code> and <code>json</code>.</li>
<li><code>short</code>: Emit shorter, human-readable text messages. Conflicts with <code>human</code>
and <code>json</code>.</li>
<li><code>json</code>: Emit JSON messages to stdout. See
<a href="../reference/external-tools.html#json-messages">the reference</a>
for more details. Conflicts with <code>human</code> and <code>short</code>.</li>
<li><code>json-diagnostic-short</code>: Ensure the <code>rendered</code> field of JSON messages contains
the &quot;short&quot; rendering from rustc. Cannot be used with <code>human</code> or <code>short</code>.</li>
<li><code>json-diagnostic-rendered-ansi</code>: Ensure the <code>rendered</code> field of JSON messages
contains embedded ANSI color codes for respecting rustc's default color
scheme. Cannot be used with <code>human</code> or <code>short</code>.</li>
<li><code>json-render-diagnostics</code>: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo's own JSON diagnostics and others
coming from rustc are still emitted. Cannot be used with <code>human</code> or <code>short</code>.</li>
</ul></dd>



</dl>

### Common Options
Expand Down
40 changes: 40 additions & 0 deletions src/etc/man/cargo-install.1
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,46 @@ terminal.
May also be specified with the \fBterm.color\fR
\fIconfig value\fR <https://doc.rust\-lang.org/cargo/reference/config.html>\&.
.RE
.sp
\fB\-\-message\-format\fR \fIfmt\fR
.RS 4
The output format for diagnostic messages. Can be specified multiple times
and consists of comma\-separated values. Valid values:
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBhuman\fR (default): Display in a human\-readable text format. Conflicts with
\fBshort\fR and \fBjson\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBshort\fR: Emit shorter, human\-readable text messages. Conflicts with \fBhuman\fR
and \fBjson\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\fR: Emit JSON messages to stdout. See
\fIthe reference\fR <https://doc.rust\-lang.org/cargo/reference/external\-tools.html#json\-messages>
for more details. Conflicts with \fBhuman\fR and \fBshort\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\-diagnostic\-short\fR: Ensure the \fBrendered\fR field of JSON messages contains
the "short" rendering from rustc. Cannot be used with \fBhuman\fR or \fBshort\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\-diagnostic\-rendered\-ansi\fR: Ensure the \fBrendered\fR field of JSON messages
contains embedded ANSI color codes for respecting rustc's default color
scheme. Cannot be used with \fBhuman\fR or \fBshort\fR\&.
.RE
.sp
.RS 4
\h'-04'\(bu\h'+02'\fBjson\-render\-diagnostics\fR: Instruct Cargo to not include rustc diagnostics in
in JSON messages printed, but instead Cargo itself should render the
JSON diagnostics coming from rustc. Cargo's own JSON diagnostics and others
coming from rustc are still emitted. Cannot be used with \fBhuman\fR or \fBshort\fR\&.
.RE
.RE
.SS "Common Options"
.sp
\fB+\fR\fItoolchain\fR
Expand Down

0 comments on commit 890b0e8

Please sign in to comment.